mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: apply formatting to pasted text only when the block is a paragraph (#4906)
This commit is contained in:
parent
ac34617e51
commit
57e3a2ce68
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user