mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 04:04:06 +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
|
* The `withHistory` plugin keeps track of the operation history of a Slate
|
||||||
* editor as operations are applied to it, using undo and redo stacks.
|
* 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) => {
|
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.
|
* `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) => {
|
export const withReact = <T extends Editor>(editor: T) => {
|
||||||
|
Reference in New Issue
Block a user