瀏覽代碼

refac: rich text input

Timothy Jaeryang Baek 3 月之前
父節點
當前提交
7cc2afe973
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/lib/components/common/RichTextInput.svelte

+ 1 - 1
src/lib/components/common/RichTextInput.svelte

@@ -136,7 +136,7 @@
 			const nodes = lines.map(
 				(line, index) =>
 					index === 0
-						? state.schema.text(line) // First line is plain text
+						? state.schema.text(line ? line : []) // First line is plain text
 						: state.schema.nodes.paragraph.create({}, line ? state.schema.text(line) : undefined) // Subsequent lines are paragraphs
 			);