mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-14 03:03:58 +02:00
Added comments to with-history and with-react to help fix TypeScript errors
This commit is contained in:
@@ -5,6 +5,11 @@ import { HistoryEditor } from './history-editor'
|
||||
/**
|
||||
* The `withHistory` plugin keeps track of the operation history of a Slate
|
||||
* editor as operations are applied to it, using undo and redo stacks.
|
||||
*
|
||||
* If you are using TypeScript, you must extend Slate's CustomTypes to use
|
||||
* this plugin.
|
||||
*
|
||||
* See https://docs.slatejs.org/concepts/11-typescript to learn how.
|
||||
*/
|
||||
|
||||
export const withHistory = <T extends Editor>(editor: T) => {
|
||||
|
@@ -8,6 +8,11 @@ import { isDOMText, getPlainText } from '../utils/dom'
|
||||
|
||||
/**
|
||||
* `withReact` adds React and DOM specific behaviors to the editor.
|
||||
*
|
||||
* If you are using TypeScript, you must extend Slate's CustomTypes to use
|
||||
* this plugin.
|
||||
*
|
||||
* See https://docs.slatejs.org/concepts/11-typescript to learn how.
|
||||
*/
|
||||
|
||||
export const withReact = <T extends Editor>(editor: T) => {
|
||||
|
Reference in New Issue
Block a user