Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PlateProps<T>

Type parameters

  • T = {}

Hierarchy

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

Index

Properties

Optional children

children: ReactNode

The children rendered inside Slate before the Editable component.

Optional decorate

decorate: null | ((entry: NodeEntry<Node>) => 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 | EditableProps

The props for the Editable component.

Optional editor

editor: null | PlateEditor<T>

Slate editor reference.

default

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

Controlled callback called when the editor state changes.

Optional plugins

plugins: PlatePlugin<T, {}>[]

Optional renderEditable

renderEditable: (editable: ReactNode) => ReactNode

Custom Editable node.

Type declaration

    • (editable: ReactNode): ReactNode
    • Parameters

      • editable: ReactNode

      Returns ReactNode

Optional renderElement

renderElement: null | ((props: RenderElementProps) => Element)

Optional renderLeaf

renderLeaf: null | ((props: RenderLeafProps) => Element)

Optional value

value: null | any[]

Value of the editor.

default

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

Generated using TypeDoc