diff --git a/app/src/protyle/wysiwyg/turnIntoList.ts b/app/src/protyle/wysiwyg/turnIntoList.ts index 8c4010cf1..56f12e686 100644 --- a/app/src/protyle/wysiwyg/turnIntoList.ts +++ b/app/src/protyle/wysiwyg/turnIntoList.ts @@ -84,6 +84,7 @@ export const headingTurnIntoList = (protyle: IProtyle, type: string, blockElemen const emptyId = Lute.NewNodeID(); const liItemId = Lute.NewNodeID(); const oldHTML = blockElement.outerHTML; + const marker = editElement.innerHTML.substring(0, 1); editElement.innerHTML = editElement.innerHTML.substring(2); transaction(protyle, [{ action: "update", @@ -92,7 +93,7 @@ export const headingTurnIntoList = (protyle: IProtyle, type: string, blockElemen }, { action: "insert", id: newId, - data: `
`, + data: `
`, previousID: id, }, { action: "move", @@ -113,7 +114,7 @@ export const headingTurnIntoList = (protyle: IProtyle, type: string, blockElemen action: "delete", id: newId }]); - blockElement.outerHTML = `
${blockElement.outerHTML}
`; + blockElement.outerHTML = `
${blockElement.outerHTML}
`; focusByWbr(protyle.wysiwyg.element, range); return true; }