Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PlateProps<T>

Type parameters

Hierarchy

Index

Properties

Optional children

children: ReactNode

The children rendered inside Slate before the Editable component.

Optional components

components: Record<string, PlatePluginComponent>

Components stored by plugin key. These will be merged into options.

see

EditorId

Optional editableProps

editableProps: EditableProps

The props for the Editable component.

Optional editor

editor: T

Slate editor reference.

default

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

Optional enabled

enabled: boolean

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

default

true

Optional id

Optional initialValue

initialValue: any[]

Initial value of the editor.

default

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

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: (value: TNode<AnyObject>[]) => void

Controlled callback called when the editor state changes.

Type declaration

Optional options

Optional plugins

plugins: PlatePlugin<T>[]

Plate plugins.

default

[createReactPlugin(), createHistoryPlugin()]

Optional renderEditable

renderEditable: (editable: ReactNode) => ReactNode

Custom Editable node.

Type declaration

    • (editable: ReactNode): ReactNode
    • Parameters

      • editable: ReactNode

      Returns ReactNode

Optional value

value: any[]

Editor value.

default

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

Generated using TypeDoc