mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-29 02:38:00 +08:00
fix: this issue paste from other sources (#61)
This commit is contained in:
@@ -89,7 +89,12 @@ export const withPasted = (editor: ReactEditor) => {
|
||||
if(html) {
|
||||
return insertHtmlData(editor, data);
|
||||
} else {
|
||||
const fragment = lines.map((line) => ({ type: BlockType.Paragraph, children: [{ text: line }] }));
|
||||
const fragment = lines.map((line) => ({
|
||||
type: BlockType.Paragraph, children: [{
|
||||
type: 'text',
|
||||
children: [{ text: line }],
|
||||
}],
|
||||
}));
|
||||
|
||||
insertFragment(editor, fragment);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user