Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix: apply formatting to pasted text only when the block is a paragraph (#4906)
q20089290757e3a2ce68cc
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/editor_state_paste_node_extension.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/editor_state_paste_node_extension.dartindex 1fc92c2d0f..34c6c8fe06 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/editor_state_paste_node_extension.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/editor_state_paste_node_extension.dart@@ -13,8 +13,8 @@ extension PasteNodes on EditorState {}final transaction = this.transaction;final insertedDelta = insertedNode.delta;- // if the node is empty, replace it with the inserted node.- if (delta.isEmpty) {+ // if the node is empty and its type is paragprah, replace it with the inserted node.+ if (delta.isEmpty && node.type == ParagraphBlockKeys.type) {transaction.insertNode(selection.end.path.next,insertedNode,