From 24cb9c54e7e8609ecd2ddbc80b6008d24b641b9a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 8 Jul 2023 22:41:59 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/8709 --- app/src/protyle/wysiwyg/turnIntoList.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }