Skip to content

Commit f343302

Browse files
authored
fix: this issue paste from other sources (#61)
1 parent a3eed75 commit f343302

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/editor/plugins/withPasted.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ export const withPasted = (editor: ReactEditor) => {
8989
if(html) {
9090
return insertHtmlData(editor, data);
9191
} else {
92-
const fragment = lines.map((line) => ({ type: BlockType.Paragraph, children: [{ text: line }] }));
92+
const fragment = lines.map((line) => ({
93+
type: BlockType.Paragraph, children: [{
94+
type: 'text',
95+
children: [{ text: line }],
96+
}],
97+
}));
9398

9499
insertFragment(editor, fragment);
95100
return true;

0 commit comments

Comments
 (0)