mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
4407baa671
commit
a13462a52a
1 changed files with 3 additions and 2 deletions
|
|
@ -382,7 +382,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
const tempElement = document.createElement("template");
|
||||
|
||||
// https://github.com/siyuan-note/siyuan/issues/14162
|
||||
if (html.startsWith(">") && editableElement.textContent.replace(Constants.ZWSP, "") !== "" ) {
|
||||
if (html.startsWith(">") && editableElement.textContent.replace(Constants.ZWSP, "") !== "") {
|
||||
unSpinHTML = html;
|
||||
}
|
||||
|
||||
|
|
@ -395,7 +395,8 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
|
||||
// https://github.com/siyuan-note/siyuan/issues/14114
|
||||
let heading2text = false;
|
||||
if (isBlock && editableElement.textContent.replace(Constants.ZWSP, "") !== "" && tempElement.content.childElementCount === 1 &&
|
||||
if (isBlock && (editableElement.textContent.replace(Constants.ZWSP, "") !== "" || blockElement.getAttribute("data-type") === "NodeHeading") &&
|
||||
tempElement.content.childElementCount === 1 &&
|
||||
tempElement.content.firstChild.nodeType !== 3 &&
|
||||
tempElement.content.firstElementChild.getAttribute("data-type") === "NodeHeading") {
|
||||
isBlock = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue