mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-13 16:06:13 +01:00
This commit is contained in:
parent
7a7af86b11
commit
334a2385b3
13 changed files with 37 additions and 35 deletions
|
|
@ -117,7 +117,7 @@ export const pasteText = (protyle: IProtyle, textPlain: string, nodeElement: Ele
|
|||
blockRender(protyle, protyle.wysiwyg.element);
|
||||
processRender(protyle.wysiwyg.element);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element, protyle);
|
||||
filterClipboardHint(protyle, textPlain);
|
||||
scrollCenter(protyle, undefined, false, "smooth");
|
||||
};
|
||||
|
|
@ -242,7 +242,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
blockRender(protyle, protyle.wysiwyg.element);
|
||||
processRender(protyle.wysiwyg.element);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element, protyle);
|
||||
} else if (code) {
|
||||
if (!code.startsWith('<div data-type="NodeCodeBlock" class="code-block" data-node-id="')) {
|
||||
// 原有代码在行内元素中粘贴会嵌套
|
||||
|
|
@ -292,7 +292,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
blockRender(protyle, protyle.wysiwyg.element);
|
||||
processRender(protyle.wysiwyg.element);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element, protyle);
|
||||
filterClipboardHint(protyle, response.data);
|
||||
scrollCenter(protyle, undefined, false, "smooth");
|
||||
});
|
||||
|
|
@ -330,7 +330,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
blockRender(protyle, protyle.wysiwyg.element);
|
||||
processRender(protyle.wysiwyg.element);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element);
|
||||
avRender(protyle.wysiwyg.element, protyle);
|
||||
}
|
||||
scrollCenter(protyle, undefined, false, "smooth");
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue