This commit is contained in:
Vanessa 2023-09-13 10:15:50 +08:00
parent c810a20eef
commit 946295913d

View file

@ -96,6 +96,16 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (!nodeElement) {
return;
}
// https://ld246.com/article/1694506408293
const endElement = hasClosestBlock(range.endContainer);
if (!matchHotKey("⌘C", event) && endElement && !nodeElement.isSameNode(endElement)) {
event.stopPropagation();
event.preventDefault();
console.log(event);
return;
}
if (nodeElement.classList.contains("av")) {
if (matchHotKey("⌘B", event) || matchHotKey("⌘I", event) || matchHotKey("⌘U", event)) {
event.preventDefault();