Skip to content

ReactEditorOptions

ReactEditorOptions = Omit<EditorOptions, "hiddenCharacters" | "onChange" | "onInitialPaint" | "theme"> & object

readonly optional document?: ReactEditorDocument | null

readonly optional hiddenCharacters?: HiddenCharactersMode

readonly optional onChange?: EditorChangeHandler

readonly optional onInitialPaint?: (event) => void

EditorInitialPaintEvent

void

readonly optional onTextChange?: (text) => void

Receives the whole text after each change that did not come from document.text or document.defaultText. Copies the document every time: O(document length) per change.

string

void

readonly optional scrollPosition?: EditorScrollPosition | null

readonly optional selection?: ReactEditorSelection | null

readonly optional storeSync?: ReactEditorStoreSyncMode

readonly optional theme?: EditorTheme | null