🎨 选中 html 块后输入的文字会出现在块中

This commit is contained in:
Vanessa 2024-06-07 10:37:29 +08:00
parent 01e5df1e3d
commit 47bb845b1d

View file

@ -1860,9 +1860,6 @@ export class WYSIWYG {
isComposition = false;
const range = getEditorRange(this.element);
const blockElement = hasClosestBlock(range.startContainer);
if (blockElement && blockElement.getAttribute("data-type") === "NodeHTMLBlock") {
return;
}
if (!blockElement) {
return;
}
@ -1898,10 +1895,6 @@ export class WYSIWYG {
if (!blockElement) {
return;
}
if (blockElement && blockElement.getAttribute("data-type") === "NodeHTMLBlock") {
event.stopPropagation();
return;
}
if ([":", "(", "【", "", "[", "{", "「", "『", "#", "/", "、"].includes(event.data)) {
protyle.hint.enableExtend = true;
}