1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-22 23:12:52 +02:00

Fix double insertion due to insertTextData being called when it should not (#4625)

* fix double paste due to insertTextData being called when it should not

* Document return type of insertTextData and insert FragmentData

* Add changeset
This commit is contained in:
Eric Charles
2021-10-27 06:09:36 +02:00
committed by GitHub
parent 02e9245646
commit e54f2a0ea0
4 changed files with 22 additions and 13 deletions

View File

@@ -142,11 +142,11 @@ Insert data from a `DataTransfer` into the editor. This is a proxy method to cal
### `insertFragmentData(editor: ReactEditor, data: DataTransfer)`
Insert fragment data from a `DataTransfer` into the editor.
Insert fragment data from a `DataTransfer` into the editor. Returns true if some content has been effectively inserted.
### `insertTextData(editor: ReactEditor, data: DataTransfer)`
Insert text data from a `DataTransfer` into the editor.
Insert text data from a `DataTransfer` into the editor. Returns true if some content has been effectively inserted.
### `setFragmentData(editor: ReactEditor, data: DataTransfer)`