mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-29 10:47:56 +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) {
|
if(html) {
|
||||||
return insertHtmlData(editor, data);
|
return insertHtmlData(editor, data);
|
||||||
} else {
|
} 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);
|
insertFragment(editor, fragment);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user