mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 17:53:59 +02:00
Add missing insertFragmentData and insertTextData on the ReactEditor class (#4622)
This commit is contained in:
@@ -230,6 +230,22 @@ export const ReactEditor = {
|
|||||||
editor.insertData(data)
|
editor.insertData(data)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert fragment data from a `DataTransfer` into the editor.
|
||||||
|
*/
|
||||||
|
|
||||||
|
insertFragmentData(editor: ReactEditor, data: DataTransfer): void {
|
||||||
|
editor.insertFragmentData(data)
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert text data from a `DataTransfer` into the editor.
|
||||||
|
*/
|
||||||
|
|
||||||
|
insertTextData(editor: ReactEditor, data: DataTransfer): void {
|
||||||
|
editor.insertTextData(data)
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets data from the currently selected fragment on a `DataTransfer`.
|
* Sets data from the currently selected fragment on a `DataTransfer`.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user