1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-11 09:43:58 +02:00

Add missing insertFragmentData and insertTextData on the ReactEditor class (#4622)

This commit is contained in:
Eric Charles
2021-10-23 12:48:05 +02:00
committed by GitHub
parent f1b7d18f43
commit b50a772136

View File

@@ -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`.
*/ */