mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 10:49:40 +08:00
This commit is contained in:
parent
f75fc9c545
commit
df9b6dc4d5
@ -1022,9 +1022,10 @@ export class Toolbar {
|
|||||||
// 需 div 包裹,否则行内元素会解析错误 https://github.com/siyuan-note/siyuan/issues/6764
|
// 需 div 包裹,否则行内元素会解析错误 https://github.com/siyuan-note/siyuan/issues/6764
|
||||||
let html = textElement.value;
|
let html = textElement.value;
|
||||||
if (!html.startsWith("<div>\n")) {
|
if (!html.startsWith("<div>\n")) {
|
||||||
html = `<div>
|
html = `<div>\n${html}`;
|
||||||
${html}
|
}
|
||||||
</div>`;
|
if (!html.startsWith("\n</div>")) {
|
||||||
|
html = `${html}\n</div>`;
|
||||||
}
|
}
|
||||||
renderElement.querySelector("protyle-html").setAttribute("data-content", Lute.EscapeHTMLStr(html));
|
renderElement.querySelector("protyle-html").setAttribute("data-content", Lute.EscapeHTMLStr(html));
|
||||||
} else if (isInlineMemo) {
|
} else if (isInlineMemo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user