This commit is contained in:
parent
83fbf8c523
commit
521c7289b8
1 changed files with 3 additions and 1 deletions
|
@ -219,7 +219,9 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
|||
// 回车之前的块为 1\n\n2 时会产生多个块
|
||||
Array.from(enterElement.children).forEach((item: HTMLElement) => {
|
||||
if (item.dataset.nodeId === id) {
|
||||
editableElement.innerHTML = item.querySelector('[contenteditable="true"]').innerHTML;
|
||||
const previousElement = blockElement.previousElementSibling;
|
||||
blockElement.outerHTML = item.outerHTML;
|
||||
blockElement = (previousElement?.nextElementSibling || protyle.wysiwyg.element.firstElementChild) as HTMLElement;
|
||||
doOperation.push({
|
||||
action: "update",
|
||||
data: blockElement.outerHTML,
|
||||
|
|
Loading…
Add table
Reference in a new issue