Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PlateProps<V, E>

Type parameters

Hierarchy

  • Partial<Omit<PlateStoreState<V, E>, "keyEditor" | "keyPlugins" | "keySelection">>
    • PlateProps

Index

Properties

Optional children

children: ReactNode

The children rendered inside Slate, after Editable.

Optional decorate

decorate: null | ((entry: ENodeEntry<V>) => BaseRange[])

Optional disableCorePlugins

disableCorePlugins: boolean | { deserializeAst?: boolean; deserializeHtml?: boolean; eventEditor?: boolean; history?: boolean; inlineVoid?: boolean; insertData?: boolean; react?: boolean }

If true, disable all the core plugins. If an object, disable the core plugin properties that are true in the object.

Optional editableProps

editableProps: null | TEditableProps<V>

The props for the Editable component.

Optional editableRef

editableRef: Ref<HTMLDivElement>

Ref to the Editable component.

Optional editor

editor: null | E

Slate editor reference.

default

pipe(createTEditor(), withPlate({ id, plugins, options, components }))

Optional enabled

enabled: null | boolean

If true, plate will create the editor with withPlate. If false, plate will remove the editor from the store.

default

true

Optional firstChildren

firstChildren: ReactNode

The first children rendered inside Slate, before Editable. Slate DOM is not yet resolvable on first render, for that case use children instead.

Optional id

id: string

A unique id used to store the editor state by id. Required if rendering multiple Plate. Optional otherwise. Default is 'main'.

Optional initialValue

initialValue: null | V

Initial value of the editor.

default

[{ children: [{ text: '' }]}]

Optional isRendered

isRendered: null | boolean

Whether Editable is rendered so slate DOM is resolvable.

Optional normalizeInitialValue

normalizeInitialValue: boolean

When true, it will normalize the initial value passed to the editor once it gets created. This is useful when adding normalization rules on already existing content.

default

false

Optional onChange

onChange: null | ((value: V) => void)

Controlled callback called when the editor state changes.

Optional plugins

plugins: PlatePlugin<AnyObject, V, E>[]

Optional renderEditable

renderEditable: (editable: ReactNode) => ReactNode

Custom Editable node.

Type declaration

    • (editable: ReactNode): ReactNode
    • Parameters

      • editable: ReactNode

      Returns ReactNode

Optional renderElement

renderElement: null | RenderElementFn<V>

Optional renderLeaf

renderLeaf: null | RenderLeafFn<V>

Optional value

value: null | V

Value of the editor.

default

[{ type: 'p', children: [{ text: '' }]}]

Generated using TypeDoc