File size: 620 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { Ancestor } from 'slate'
import { DOMEditor, type DOMEditorInterface } from 'slate-dom'

/**
 * A React and DOM-specific version of the `Editor` interface.
 */

export interface ReactEditor extends DOMEditor {
  /**
   * Determines the chunk size used by the children chunking optimization. If
   * null is returned (which is the default), the chunking optimization is
   * disabled.
   */
  getChunkSize: (node: Ancestor) => number | null
}

export interface ReactEditorInterface extends DOMEditorInterface {}

// eslint-disable-next-line no-redeclare
export const ReactEditor: ReactEditorInterface = DOMEditor