🎨 加强粘贴判断

This commit is contained in:
Vanessa 2023-12-25 21:31:00 +08:00
parent 9cf2d34111
commit 7eec8a6b85

View file

@ -1527,6 +1527,11 @@ export class WYSIWYG {
event.stopPropagation();
return;
}
if (!hasClosestByAttribute(event.target, "contenteditable", "true")) {
event.stopPropagation();
event.preventDefault();
return;
}
const blockElement = hasClosestBlock(event.target);
if (blockElement && !getContenteditableElement(blockElement)) {
event.stopPropagation();