mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🎨 加强粘贴判断
This commit is contained in:
parent
9cf2d34111
commit
7eec8a6b85
1 changed files with 5 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue