mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
fe63530325
commit
bffa2235c2
3 changed files with 26 additions and 4 deletions
|
|
@ -191,7 +191,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
});
|
||||
const tempInnerHTML = tempElement.innerHTML;
|
||||
insertHTML(tempInnerHTML, protyle, isBlock);
|
||||
filterClipboardHint(protyle, tempInnerHTML);
|
||||
filterClipboardHint(protyle, protyle.lute.BlockDOM2StdMd(tempInnerHTML));
|
||||
blockRender(protyle, protyle.wysiwyg.element);
|
||||
processRender(protyle.wysiwyg.element);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
|
|
@ -220,6 +220,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
insertHTML(code, protyle, true);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
}
|
||||
hideElements(["hint"], protyle)
|
||||
} else {
|
||||
let isHTML = false;
|
||||
if (textHTML.replace("<!--StartFragment--><!--EndFragment-->", "").trim() !== "") {
|
||||
|
|
@ -278,7 +279,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
}
|
||||
const textPlainDom = protyle.lute.Md2BlockDOM(textPlain);
|
||||
insertHTML(textPlainDom, protyle);
|
||||
filterClipboardHint(protyle, textPlainDom);
|
||||
filterClipboardHint(protyle, textPlain);
|
||||
}
|
||||
blockRender(protyle, protyle.wysiwyg.element);
|
||||
processRender(protyle.wysiwyg.element);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue