Skip to content

Commit

Permalink
Add missing insertFragmentData and insertTextData on the ReactEditor …
Browse files Browse the repository at this point in the history
  • Loading branch information
echarles authored Oct 23, 2021
1 parent f1b7d18 commit b50a772
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/slate-react/src/plugin/react-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,22 @@ export const ReactEditor = {
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`.
*/
Expand Down

0 comments on commit b50a772

Please sign in to comment.