mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-15 13:18:51 +01:00
This commit is contained in:
parent
bd21522b33
commit
967fbbc05f
1 changed files with 8 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
|||
if (trimStartHTML.indexOf("\n") === -1 && trimStartHTML.replace(/·|~/g, "`").replace(/^`{3,}/g, "").indexOf("`") > -1) {
|
||||
// ```test` 不处理,正常渲染为段落块
|
||||
} else if (blockElement.classList.contains("p")) { // https://github.com/siyuan-note/siyuan/issues/6953
|
||||
range.insertNode(document.createElement("wbr"));
|
||||
const oldHTML = blockElement.outerHTML;
|
||||
// https://github.com/siyuan-note/siyuan/issues/16744
|
||||
range.extractContents();
|
||||
|
|
@ -352,6 +353,13 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
|||
return true;
|
||||
}
|
||||
}
|
||||
undoOperation.find((item, index) => {
|
||||
if (item.action === "update") {
|
||||
undoOperation.splice(index, 1);
|
||||
undoOperation.push(item);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
transaction(protyle, doOperation, undoOperation);
|
||||
if (currentElement.parentElement.classList.contains("sb") &&
|
||||
currentElement.parentElement.getAttribute("data-sb-layout") === "col") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue