diff --git a/src/lib/components/common/RichTextInput.svelte b/src/lib/components/common/RichTextInput.svelte index 21dc926ccf..c8e6e886a2 100644 --- a/src/lib/components/common/RichTextInput.svelte +++ b/src/lib/components/common/RichTextInput.svelte @@ -271,12 +271,36 @@ const { state, view } = editor; const { schema, tr } = state; - // If content is a string, convert it to a ProseMirror node - const htmlContent = marked.parse(content, { + // Configure marked with extensions + marked.use({ breaks: true, - gfm: true + gfm: true, + renderer: { + list(body, ordered, start) { + const isTaskList = body.includes('data-checked='); + + if (isTaskList) { + return `