mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 17:56:09 +01:00
🐛 行级元素键盘和下划线无法粘贴为纯文本 Fix https://github.com/siyuan-note/siyuan/issues/6220
This commit is contained in:
parent
1bc9c37602
commit
49fd4bc1d0
4 changed files with 9 additions and 2 deletions
|
|
@ -50,7 +50,10 @@ export const pasteAsPlainText = async (protyle:IProtyle) => {
|
|||
uploadLocalFiles(localFiles, protyle, false);
|
||||
writeText("");
|
||||
} else {
|
||||
insertHTML(protyle.lute.BlockDOM2Content(protyle.lute.InlineMd2BlockDOM(clipboard.readText())), protyle, false);
|
||||
protyle.lute.SetHTMLTag2TextMark(true); // 临时设置 Lute 解析参数,行级元素键盘和下划线无法粘贴为纯文本 https://github.com/siyuan-note/siyuan/issues/6220
|
||||
const dom = protyle.lute.InlineMd2BlockDOM(clipboard.readText())
|
||||
protyle.lute.SetHTMLTag2TextMark(false);
|
||||
insertHTML(protyle.lute.BlockDOM2Content(dom), protyle, false);
|
||||
}
|
||||
/// #endif
|
||||
};
|
||||
|
|
|
|||
2
app/src/types/protyle.d.ts
vendored
2
app/src/types/protyle.d.ts
vendored
|
|
@ -215,6 +215,8 @@ declare class Lute {
|
|||
|
||||
public SetProtyleWYSIWYG(wysiwyg: boolean): void;
|
||||
|
||||
public SetHTMLTag2TextMark(enable: boolean): void;
|
||||
|
||||
public MarkdownStr(name: string, md: string): string;
|
||||
|
||||
public IsValidLinkDest(text: string): boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue