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 transaction = this.transaction;
|
||||||
final insertedDelta = insertedNode.delta;
|
final insertedDelta = insertedNode.delta;
|
||||||
// if the node is empty, replace it with the inserted node.
|
// if the node is empty and its type is paragprah, replace it with the inserted node.
|
||||||
if (delta.isEmpty) {
|
if (delta.isEmpty && node.type == ParagraphBlockKeys.type) {
|
||||||
transaction.insertNode(
|
transaction.insertNode(
|
||||||
selection.end.path.next,
|
selection.end.path.next,
|
||||||
insertedNode,
|
insertedNode,
|
||||||
|
Loading…
Reference in New Issue
Block a user