Options
All
  • Public
  • Public/Protected
  • All
Menu

@udecode/plate - v10.8.0

Index

Enumerations

Interfaces

Type aliases

Variables

Functions

Type aliases

Alignment

Alignment: "left" | "center" | "right" | "justify"

AutoformatRule

ColorInputStyles

ColorInputStyles: { input?: CSSProp }

Type declaration

  • Optional input?: CSSProp

    Input.

ColorType

ColorType: { isBrightColor: boolean; name: string; value: string }

Type declaration

  • isBrightColor: boolean
  • name: string
  • value: string

ComboboxOnSelectItem

ComboboxOnSelectItem<TData>: (editor: PlateEditor, item: TComboboxItem<TData>) => any

Type parameters

  • TData

Type declaration

ComboboxState

ComboboxState<TData>: { activeId: string | null; byId: Record<string, ComboboxStoreById>; filteredItems: TComboboxItem<TData>[]; highlightedIndex: number; items: TComboboxItem<TData>[]; popperContainer?: Document | HTMLElement; popperOptions?: any; targetRange: Range | null; text: string | null }

Type parameters

Type declaration

  • activeId: string | null

    Active id (combobox id which is opened).

  • byId: Record<string, ComboboxStoreById>

    Object whose keys are combobox ids and values are config stores (e.g. one for tag, one for mention,...).

  • filteredItems: TComboboxItem<TData>[]

    Filtered items

  • highlightedIndex: number

    Highlighted index.

  • items: TComboboxItem<TData>[]

    Unfiltered items.

  • Optional popperContainer?: Document | HTMLElement

    Parent element of the popper element (the one that has the scroll).

    default

    document

  • Optional popperOptions?: any

    Overrides usePopper options.

  • targetRange: Range | null

    Range from the trigger to the cursor.

  • text: string | null

    Text after the trigger.

ComboboxStateById

ComboboxStateById<TData>: { controlled?: boolean; filter?: (search: string) => (item: TComboboxItem<TData>) => boolean; id: string; maxSuggestions?: number; onSelectItem: ComboboxOnSelectItem<TData> | null; searchPattern?: string; trigger: string }

Type parameters

Type declaration

  • Optional controlled?: boolean

    Is opening/closing the combobox controlled by the client.

  • Optional filter?: (search: string) => (item: TComboboxItem<TData>) => boolean

    Items filter function by text.

    default

    (value) => value.text.toLowerCase().startsWith(search.toLowerCase())

  • id: string

    Combobox id.

  • Optional maxSuggestions?: number

    Max number of items.

    default

    items.length

  • onSelectItem: ComboboxOnSelectItem<TData> | null

    Called when an item is selected.

  • Optional searchPattern?: string

    Regular expression for search, for example to allow whitespace

  • trigger: string

    Trigger that activates the combobox.

ComboboxStoreById

ComboboxStoreById<TData>: StoreApi<string, ComboboxStateById<TData>, StateActions<ComboboxStateById<TData>>>

Type parameters

DOMHandler

DOMHandler<T, P, E>: (editor: PlateEditor<T>, plugin: WithPlatePlugin<T, P>) => (event: E) => HandlerReturnType

Type parameters

  • T = {}

  • P = {}

  • E = {}

Type declaration

Data

Data: unknown

Decorate

Decorate<T, P>: (editor: PlateEditor<T>, plugin: WithPlatePlugin<T, P>) => (entry: NodeEntry) => Range[] | undefined

Property used by Plate to decorate editor ranges. If the function returns undefined then no ranges are modified. If the function returns an array the returned ranges are merged with the ranges called by other plugins.

Type parameters

  • T = {}

  • P = {}

Type declaration

    • Parameters

      Returns (entry: NodeEntry) => Range[] | undefined

        • (entry: NodeEntry): Range[] | undefined
        • Parameters

          • entry: NodeEntry

          Returns Range[] | undefined

DeepPartial

DeepPartial<T>: T extends infer U[] ? DeepPartial<U>[] : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {[ key in keyof T]: T[key] } ? {[ K in keyof T]: DeepPartial<T[K]> } : T

Type parameters

  • T

DefaultPlatePluginKey

DefaultPlatePluginKey: typeof ELEMENT_BLOCKQUOTE | typeof ELEMENT_CODE_BLOCK | typeof ELEMENT_CODE_LINE | typeof ELEMENT_H1 | typeof ELEMENT_H2 | typeof ELEMENT_H3 | typeof ELEMENT_H4 | typeof ELEMENT_H5 | typeof ELEMENT_H6 | typeof ELEMENT_IMAGE | typeof ELEMENT_LI | typeof ELEMENT_LINK | typeof ELEMENT_MEDIA_EMBED | typeof ELEMENT_MENTION | typeof ELEMENT_MENTION_INPUT | typeof ELEMENT_OL | typeof ELEMENT_PARAGRAPH | typeof ELEMENT_TABLE | typeof ELEMENT_TD | typeof ELEMENT_TH | typeof ELEMENT_TODO_LI | typeof ELEMENT_TR | typeof ELEMENT_UL | typeof MARK_BOLD | typeof MARK_CODE | typeof MARK_HIGHLIGHT | typeof MARK_ITALIC | typeof MARK_KBD | typeof MARK_SEARCH_HIGHLIGHT | typeof MARK_STRIKETHROUGH | typeof MARK_SUBSCRIPT | typeof MARK_SUPERSCRIPT | typeof MARK_UNDERLINE

DeserializeHtml

DeserializeHtml: { attributeNames?: string[]; getNode?: (element: HTMLElement, node: AnyObject) => AnyObject | undefined | void; isElement?: boolean; isLeaf?: boolean; query?: (element: HTMLElement) => boolean; rules?: { validAttribute?: string | {}; validClassName?: string; validNodeName?: string | string[]; validStyle?: Partial<Record<keyof CSSStyleDeclaration, string | string[] | undefined>> }[]; withoutChildren?: boolean }

Type declaration

  • Optional attributeNames?: string[]

    List of HTML attribute names to store their values in node.attributes.

  • Optional getNode?: (element: HTMLElement, node: AnyObject) => AnyObject | undefined | void

    Deserialize html element to slate node.

  • Optional isElement?: boolean

    Deserialize an element. Use this instead of plugin.isElement if you don't want the plugin to renderElement.

    default

    plugin.isElement

  • Optional isLeaf?: boolean

    Deserialize a leaf. Use this instead of plugin.isLeaf if you don't want the plugin to renderLeaf.

    default

    plugin.isLeaf

  • Optional query?: (element: HTMLElement) => boolean
      • (element: HTMLElement): boolean
      • Parameters

        • element: HTMLElement

        Returns boolean

  • Optional rules?: { validAttribute?: string | {}; validClassName?: string; validNodeName?: string | string[]; validStyle?: Partial<Record<keyof CSSStyleDeclaration, string | string[] | undefined>> }[]
  • Optional withoutChildren?: boolean

    Whether or not to include deserialized children on this node

DeserializeHtmlChildren

DeserializeHtmlChildren: ChildNode | TDescendant | string | null

DeserializeHtmlNodeReturnType

DeserializeHtmlNodeReturnType: string | null | TDescendant[] | TElement | DeserializeHtmlChildren[]

De

DropDirection

DropDirection: "top" | "bottom" | undefined

EditorId

EditorId: string | null | undefined

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

default

'main'

EventEditorState

EventEditorState: { blur: string | null; focus: string | null; last: string | null }

Type declaration

  • blur: string | null

    Last editor id that has been blurred.

  • focus: string | null

    Editor id that is currently being focused.

  • last: string | null

    Last editor id.

FindNodeOptions

FindNodeOptions<T>: EditorNodesOptions<T>

Type parameters

FunctionProperties

FunctionProperties<T>: Pick<T, FunctionPropertyNames<T>>

Get the properties from an interface which are functions

Type parameters

  • T

FunctionPropertyNames

FunctionPropertyNames<T>: {[ K in keyof T]: T[K] extends Function ? K : never }[keyof T]

Get the property names from an interface which are functions

Type parameters

  • T

GetMatchPointsReturnType

GetMatchPointsReturnType: undefined | { afterStartMatchPoint: Point | undefined; beforeEndMatchPoint: Point; beforeStartMatchPoint: Point | undefined }

HandlerReturnType

HandlerReturnType: boolean | void

If true, the next handlers will be skipped.

HotkeyPlugin

HotkeyPlugin: { hotkey?: string | string[] }

Type declaration

  • Optional hotkey?: string | string[]

    Hotkeys to listen to trigger a plugin action.

IndentPlugin

IndentPlugin: { indentMax?: number; offset?: number; unit?: string }

Type declaration

  • Optional indentMax?: number

    Maximum number of indentation.

  • Optional offset?: number

    Indentation offset used in (offset * element.indent) + unit.

    default

    40

  • Optional unit?: string

    Indentation unit used in (offset * element.indent) + unit.

    default

    'px'

InjectComponent

InjectComponent: <T>(props: PlateRenderElementProps & { key: string } & T) => RenderFunction<PlateRenderElementProps> | undefined

Type declaration

InjectedPlugin

InjectedPlugin<T>: Partial<PlatePlugin<T>>

Type parameters

  • T = {}

KeyboardEventHandler

KeyboardEventHandler: (event: KeyboardEvent) => HandlerReturnType

Type declaration

KeyboardHandler

KeyboardHandler<T, P>: DOMHandler<T, P, KeyboardEvent>

Type parameters

  • T = {}

  • P = {}

MediaEmbedElementProps

MentionInputNode

MentionInputNode: TElement<MentionInputNodeData>

MentionNode

MoveListItemsOptions

MoveListItemsOptions: { at?: EditorNodesOptions["at"]; increase?: boolean }

Type declaration

NoData

NoData: undefined

NoInfer

NoInfer<T>: [T][T extends any ? 0 : never]

Type parameters

  • T

NodeMatch

NodeMatch<T>: Predicate<T>

Type parameters

Nullable

Nullable<T>: {[ P in keyof T]: T[P] | null }

Type parameters

  • T

OnChange

OnChange<T, P>: (editor: PlateEditor<T>, plugin: WithPlatePlugin<T, P>) => (value: TNode[]) => HandlerReturnType

Function called whenever a change occurs in the editor. Return false to prevent calling the next plugin handler.

see

{@link SlatePropsOnChange}

Type parameters

  • T = {}

  • P = {}

Type declaration

OnError

OnError: (err: any) => void

Type declaration

    • (err: any): void
    • Parameters

      • err: any

      Returns void

Options

Options<T>: Partial<T> & AnyObject & { key?: string; keys?: string[] }

Type parameters

  • T

OverrideByKey

OverrideByKey<T>: Record<PluginKey, Partial<PlatePlugin<T>>>

Type parameters

  • T = {}

PartialPick

PartialPick<T, K>: {[ P in K]: T[P] }

Type parameters

  • T

  • K: keyof T

PlateChangeKey

PlateChangeKey: "keyEditor" | "keyPlugins" | "keySelection"

PlateEditor

PlateEditor<T>: PEditor<T> & HistoryEditor & ReactEditor & T

Type parameters

  • T = {}

PlatePlugin

PlatePlugin<T, P>: Required<PlatePluginKey> & { editor?: Nullable<{ insertData?: PlatePluginInsertData }>; handlers?: Nullable<DOMHandlers<T, P> & { onChange?: OnChange<T, P> }>; inject?: Nullable<{ aboveComponent?: InjectComponent; belowComponent?: InjectComponent; pluginsByKey?: Record<PluginKey, Partial<PlatePlugin<T>>> }>; isElement?: boolean; isInline?: boolean; isLeaf?: boolean; isVoid?: boolean; options?: P; type?: string } & InjectProps & Nullable<{ component?: PlatePluginComponent; decorate?: Decorate<T, P>; deserializeHtml?: Nullable<DeserializeHtml>; overrideByKey?: Record<PluginKey, Partial<PlatePlugin<T>>>; plugins?: PlatePlugin<T>[]; props?: PlatePluginProps; serializeHtml?: SerializeHtml; then?: (editor: PlateEditor<T>, plugin: WithPlatePlugin<T, P>) => Partial<PlatePlugin<T, P>> | void; useHooks?: (editor: PlateEditor<T>, plugin: WithPlatePlugin<T, P>) => void; withOverrides?: WithOverride<T, P> }>

The PlatePlugin interface is a base interface for all plugins.

Type parameters

  • T = {}

  • P = {}

PlatePluginComponent

PlatePluginComponent<T>: RenderFunction<T>

The plate plugin component.

Type parameters

  • T = any

PlatePluginInsertData

PlatePluginInsertData: { format?: string; getFragment?: (options: PlatePluginInsertDataOptions) => TDescendant[] | undefined; preInsert?: (fragment: TDescendant[], options: PlatePluginInsertDataOptions) => HandlerReturnType; query?: (options: PlatePluginInsertDataOptions) => boolean; transformData?: (data: string, options: { dataTransfer: DataTransfer }) => string; transformFragment?: (fragment: TDescendant[], options: PlatePluginInsertDataOptions) => TDescendant[] }

Type declaration

PlatePluginInsertDataOptions

PlatePluginInsertDataOptions: { data: string; dataTransfer: DataTransfer }

Type declaration

  • data: string
  • dataTransfer: DataTransfer

PlatePluginProps

PlatePluginProps: AnyObject | ((props: PlateRenderElementProps | PlateRenderLeafProps) => AnyObject | undefined)

Props object or function returning props object.

PlateRenderElementProps

PlateRenderElementProps<EElement>: PlateRenderNodeProps & TRenderElementProps<EElement>

Element props passed by Plate

Type parameters

PlateRenderLeafProps

PlateRenderLeafProps<EText>: PlateRenderNodeProps & TRenderLeafProps<EText>

Leaf props passed by Plate

Type parameters

PlateStoreApi

PlateStoreApi: ReturnType<typeof createPlateStore>

PlateStoreState

PlateStoreState<T>: { id: string; plugins: PlatePlugin<T>[] } & Required<Nullable<Pick<EditableProps, "decorate" | "renderElement" | "renderLeaf">>> & Nullable<{ editableProps: EditableProps; editor: PlateEditor<T>; enabled: boolean; keyEditor: number; keyPlugins: number; keySelection: number; onChange: (value: TNode[]) => void; value: TDescendant[] }>

Type parameters

  • T = {}

PlatesStoreApi

PlatesStoreApi: typeof platesStore

PlatesStoreState

PlatesStoreState: Record<string, PlateStoreApi>

PluginKey

PluginKey: string

Unique key to store the plugins by key.

PortalBodyProps

PortalBodyProps: { children: ReactNode; element?: Element }

Type declaration

  • children: ReactNode
  • Optional element?: Element

Predicate

Predicate<T>: PredicateObj<T> | PredicateFn<T>

Type parameters

  • T

PredicateFn

PredicateFn<T>: (obj: T) => boolean

Type parameters

  • T

Type declaration

    • (obj: T): boolean
    • Parameters

      • obj: T

      Returns boolean

PredicateObj

PredicateObj<T>: Partial<Record<keyof T, any | any[]>>

Type parameters

  • T

RenderElement

RenderElement: (props: PlateRenderElementProps) => JSX.Element | undefined

Function used to render an element. If the function returns undefined then the next RenderElement function is called. If the function renders a JSX element then that JSX element is rendered.

Type declaration

RenderLeaf

RenderLeaf: (props: PlateRenderLeafProps) => JSX.Element

Function used to render the children of a leaf. If the function returns undefined then the next RenderLeaf function is called and the current children are not modified. The children passed to the function may be the result of a previous plugin. To wrap the previous plugin simply return the passed children. You do not need to add the attributes to your return value. The attributes are added by default. RenderLeaf always returns a JSX element (even if unmodified) to support multiple marks on a node.

Type declaration

RtfImagesMap

RtfImagesMap: Record<RtfImage["spid"], RtfImage>

SelectOnBackspacePlugin

SelectOnBackspacePlugin: { query?: QueryNodeOptions }

Type declaration

SerializeHtml

StyledElementProps

StyledElementProps<TElement, TStyles>: PlateRenderElementProps<TElement> & StyledProps<TStyles> & HTMLAttributes<HTMLElement>

Type parameters

  • TElement = Element

  • TStyles = {}

StyledLeafProps

StyledLeafProps<TText, TStyles>: PlateRenderLeafProps<TText> & StyledProps<TStyles>

Type parameters

  • TText = Text

  • TStyles = {}

TAncestor

TAncestor<TExtension>: TEditor<TExtension> | TElement<TExtension>

Type parameters

TComboboxItem

TComboboxItem<TData>: TData extends NoData ? TComboboxItemBase : TComboboxItemWithData<TData>

Type parameters

TDescendant

TDescendant<TExtension>: TElement<TExtension> | TText<TExtension>

Type parameters

TEditor

TEditor<TExtension>: Editor & TExtension & AnyObject & { children: TDescendant[] }

Type parameters

TElement

TElement<TExtension>: Element & TExtension & AnyObject & { children: TDescendant[]; type: string }

Type parameters

TNode

TNode<TExtension>: TEditor<TExtension> | TElement<TExtension> | TText<TExtension>

Type parameters

TNodeMatch

TNodeMatch<T>: ((node: TNode, path: Path) => node is T) | ((node: TNode, path: Path) => boolean)

Type parameters

TRenderElementProps

TRenderElementProps<TExtension>: Omit<RenderElementProps, "element"> & { element: TElement<TExtension> }

Type parameters

TRenderLeafProps

TRenderLeafProps<TExtension>: Omit<RenderLeafProps, "leaf" | "text"> & { leaf: TText<Extension & TExtension>; text: TText<Extension & TExtension> }

Type parameters

TText

TText<TExtension>: Text & TExtension & AnyObject

Type parameters

TodoListElementProps

UnindentListItemsOptions

UnindentListItemsOptions: Omit<MoveListItemsOptions, "increase">

UsePlateStoreEffects

UsePlateStoreEffects<T>: Pick<PlateProps<T>, "id" | "value" | "enabled" | "onChange" | "editableProps" | "plugins" | "decorate" | "renderElement" | "renderLeaf">

Type parameters

  • T = {}

UsePopperOptions

UsePopperOptions: Omit<Partial<PopperJS.Options>, "modifiers"> & { createPopper?: typeof PopperJS.createPopper; modifiers?: ReadonlyArray<Partial<Modifier<string, object>>> }

WithOptional

WithOptional<T, K>: Omit<T, K> & Partial<Pick<T, K>>

Type parameters

  • T

  • K: keyof T

WithOverride

WithOverride<T, P>: (editor: PlateEditor<T>, plugin: WithPlatePlugin<T, P>) => PlateEditor<T>

Plate plugin overriding the editor methods. Naming convention is with*.

Type parameters

  • T = {}

  • P = {}

Type declaration

WithPartial

WithPartial<T, K>: Omit<T, K> & Partial<T>

Type parameters

  • T

  • K: keyof T

WithPlatePlugin

WithPlatePlugin<T, P>: WithRequired<PlatePlugin<T, P>, "type" | "options" | "inject" | "editor">

Type parameters

  • T = {}

  • P = {}

WithRequired

WithRequired<T, K>: Omit<T, K> & Required<Pick<T, K>>

Type parameters

  • T

  • K: keyof T

Variables

Const AlignToolbarButton

AlignToolbarButton: React.FunctionComponent<AlignToolbarButtonProps>

Const BalloonToolbar

BalloonToolbar: React.FunctionComponent<BalloonToolbarProps>

Const BlockToolbarButton

BlockToolbarButton: React.FunctionComponent<BlockToolbarButtonProps>

Toolbar button to toggle the type of elements in selection.

Const CARRIAGE_RETURN

CARRIAGE_RETURN: "\r" = "\r"

Const CODE_BLOCK_LANGUAGES

CODE_BLOCK_LANGUAGES: Record<string, string>

Const CODE_BLOCK_LANGUAGES_POPULAR

CODE_BLOCK_LANGUAGES_POPULAR: Record<string, string>

Const CodeBlockToolbarButton

CodeBlockToolbarButton: React.FunctionComponent<ToolbarButtonProps & { options?: CodeBlockInsertOptions }>

Const ColorPicker

ColorPicker: React.MemoExoticComponent<({ color, colors, customColors, selectedIcon, updateColor, updateCustomColor, clearColor, }: ColorPickerProps) => JSX.Element>

Const ColorPickerToolbarDropdown

ColorPickerToolbarDropdown: React.FunctionComponent<ColorPickerToolbarDropdownProps & ToolbarButtonProps>

Const DEFAULT_COLORS

DEFAULT_COLORS: { isBrightColor: boolean; name: string; value: string }[]

Const DEFAULT_CUSTOM_COLORS

DEFAULT_CUSTOM_COLORS: { isBrightColor: boolean; name: string; value: string }[]

Const DOM_HANDLERS

DOM_HANDLERS: keyof DOMHandlers[]

Const ELEMENT_BLOCKQUOTE

ELEMENT_BLOCKQUOTE: "blockquote" = "blockquote"

Const ELEMENT_CODE_BLOCK

ELEMENT_CODE_BLOCK: "code_block" = "code_block"

Const ELEMENT_CODE_LINE

ELEMENT_CODE_LINE: "code_line" = "code_line"

Const ELEMENT_CODE_SYNTAX

ELEMENT_CODE_SYNTAX: "code_syntax" = "code_syntax"

Const ELEMENT_DEFAULT

ELEMENT_DEFAULT: "p" = "p"

Const ELEMENT_H1

ELEMENT_H1: "h1" = "h1"

Const ELEMENT_H2

ELEMENT_H2: "h2" = "h2"

Const ELEMENT_H3

ELEMENT_H3: "h3" = "h3"

Const ELEMENT_H4

ELEMENT_H4: "h4" = "h4"

Const ELEMENT_H5

ELEMENT_H5: "h5" = "h5"

Const ELEMENT_H6

ELEMENT_H6: "h6" = "h6"

Const ELEMENT_HR

ELEMENT_HR: "hr" = "hr"

Const ELEMENT_IMAGE

ELEMENT_IMAGE: "img" = "img"

Const ELEMENT_LI

ELEMENT_LI: "li" = "li"

Const ELEMENT_LIC

ELEMENT_LIC: "lic" = "lic"

Const ELEMENT_LINK

ELEMENT_LINK: "a" = "a"

Const ELEMENT_MEDIA_EMBED

ELEMENT_MEDIA_EMBED: "media_embed" = "media_embed"

Const ELEMENT_MENTION

ELEMENT_MENTION: "mention" = "mention"

Const ELEMENT_MENTION_INPUT

ELEMENT_MENTION_INPUT: "mention_input" = "mention_input"

Const ELEMENT_OL

ELEMENT_OL: "ol" = "ol"

Const ELEMENT_PARAGRAPH

ELEMENT_PARAGRAPH: "p" = "p"

Const ELEMENT_TABLE

ELEMENT_TABLE: "table" = "table"

Const ELEMENT_TD

ELEMENT_TD: "td" = "td"

Const ELEMENT_TH

ELEMENT_TH: "th" = "th"

Const ELEMENT_TODO_LI

ELEMENT_TODO_LI: "action_item" = "action_item"

Const ELEMENT_TR

ELEMENT_TR: "tr" = "tr"

Const ELEMENT_UL

ELEMENT_UL: "ul" = "ul"

Const EditorStateEffect

EditorStateEffect: MemoExoticComponent

Const HeadingToolbar

HeadingToolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>

Const KEYS_HEADING

KEYS_HEADING: string[]

Const KEY_ALIGN

KEY_ALIGN: "align" = "align"

Const KEY_AUTOFORMAT

KEY_AUTOFORMAT: "autoformat" = "autoformat"

Const KEY_COMBOBOX

KEY_COMBOBOX: "combobox" = "combobox"

Const KEY_DESERIALIZE_AST

KEY_DESERIALIZE_AST: "deserializeAst" = "deserializeAst"

Const KEY_DESERIALIZE_CSV

KEY_DESERIALIZE_CSV: "deserializeCsv" = "deserializeCsv"

Const KEY_DESERIALIZE_DOCX

KEY_DESERIALIZE_DOCX: "deserializeDocx" = "deserializeDocx"

Const KEY_DESERIALIZE_HTML

KEY_DESERIALIZE_HTML: "deserializeHtml" = "deserializeHtml"

Const KEY_DESERIALIZE_MD

KEY_DESERIALIZE_MD: "deserializeMd" = "deserializeMd"

Const KEY_DND

KEY_DND: "dnd" = "dnd"

Const KEY_EVENT_EDITOR

KEY_EVENT_EDITOR: "event-editor" = "event-editor"

Const KEY_EXIT_BREAK

KEY_EXIT_BREAK: "exitBreak" = "exitBreak"

Const KEY_INDENT

KEY_INDENT: "indent" = "indent"

Const KEY_INLINE_VOID

KEY_INLINE_VOID: "inline-void" = "inline-void"

Const KEY_INSERT_DATA

KEY_INSERT_DATA: "insertData" = "insertData"

Const KEY_JUICE

KEY_JUICE: "juice" = "juice"

Const KEY_LINE_HEIGHT

KEY_LINE_HEIGHT: "lineHeight" = "lineHeight"

Const KEY_LIST_START

KEY_LIST_START: "listStart" = "listStart"

Const KEY_LIST_STYLE_TYPE

KEY_LIST_STYLE_TYPE: "listStyleType" = "listStyleType"

Const KEY_NODE_ID

KEY_NODE_ID: "nodeId" = "nodeId"

Const KEY_NORMALIZE_TYPES

KEY_NORMALIZE_TYPES: "normalizeTypes" = "normalizeTypes"

Const KEY_RESET_NODE

KEY_RESET_NODE: "resetNode" = "resetNode"

Const KEY_SELECT_ON_BACKSPACE

KEY_SELECT_ON_BACKSPACE: "selectOnBackspace" = "selectOnBackspace"

Const KEY_SINGLE_LINE

KEY_SINGLE_LINE: "singleLine" = "singleLine"

Const KEY_SOFT_BREAK

KEY_SOFT_BREAK: "softBreak" = "softBreak"

Const KEY_TEXT_INDENT

KEY_TEXT_INDENT: "textIndent" = "textIndent"

Const KEY_TRAILING_BLOCK

KEY_TRAILING_BLOCK: "trailingBlock" = "trailingBlock"

Const LINE_FEED

LINE_FEED: "\n" = "\n"

Const LineHeightToolbarDropdown

LineHeightToolbarDropdown: React.FunctionComponent<ToolbarButtonProps>

Const LinkToolbarButton

LinkToolbarButton: React.FunctionComponent<LinkToolbarButtonProps>

Const ListToolbarButton

ListToolbarButton: React.FunctionComponent<ToolbarButtonProps & { type?: string }>

Const MARK_BG_COLOR

MARK_BG_COLOR: "backgroundColor" = "backgroundColor"

Const MARK_BOLD

MARK_BOLD: "bold" = "bold"

Const MARK_CODE

MARK_CODE: "code" = "code"

Const MARK_COLOR

MARK_COLOR: "color" = "color"

Const MARK_FONT_FAMILY

MARK_FONT_FAMILY: "fontFamily" = "fontFamily"

Const MARK_FONT_SIZE

MARK_FONT_SIZE: "fontSize" = "fontSize"

Const MARK_FONT_WEIGHT

MARK_FONT_WEIGHT: "fontWeight" = "fontWeight"

Const MARK_HIGHLIGHT

MARK_HIGHLIGHT: "highlight" = "highlight"

Const MARK_ITALIC

MARK_ITALIC: "italic" = "italic"

Const MARK_KBD

MARK_KBD: "kbd" = "kbd"

Const MARK_SEARCH_HIGHLIGHT

MARK_SEARCH_HIGHLIGHT: "search_highlight" = "search_highlight"

Const MARK_STRIKETHROUGH

MARK_STRIKETHROUGH: "strikethrough" = "strikethrough"

Const MARK_SUBSCRIPT

MARK_SUBSCRIPT: "subscript" = "subscript"

Const MARK_SUPERSCRIPT

MARK_SUPERSCRIPT: "superscript" = "superscript"

Const MARK_UNDERLINE

MARK_UNDERLINE: "underline" = "underline"

Const MarkToolbarButton

MarkToolbarButton: React.FunctionComponent<MarkToolbarButtonProps>

Toolbar button to toggle the mark of the leaves in selection.

Const NO_BREAK_SPACE

NO_BREAK_SPACE: " " = "\u00A0"

Const SIMULATE_BACKSPACE

SIMULATE_BACKSPACE: any

Const SPACE

SPACE: " " = " "

Const StyledIcon

StyledIcon: StyledComponent

Const TAB

TAB: "\t" = "\t"

Const TableToolbarButton

TableToolbarButton: React.FunctionComponent<TableToolbarButtonProps>

Const Toolbar

Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>

Const ToolbarBase

ToolbarBase: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>

Const ZERO_WIDTH_SPACE

ZERO_WIDTH_SPACE: "​" = "\u200B"

Const autoformatArrow

autoformatArrow: AutoformatRule[]

Const autoformatComparison

autoformatComparison: AutoformatRule[]

Const autoformatDivision

autoformatDivision: AutoformatRule[]

Const autoformatEquality

autoformatEquality: AutoformatRule[]

Const autoformatFraction

autoformatFraction: AutoformatRule[]

Const autoformatLegal

autoformatLegal: AutoformatRule[]

Const autoformatLegalHtml

autoformatLegalHtml: AutoformatRule[]

Const autoformatMath

autoformatMath: AutoformatRule[]

Const autoformatOperation

autoformatOperation: AutoformatRule[]

Const autoformatPunctuation

autoformatPunctuation: AutoformatRule[]

Const autoformatSmartQuotes

autoformatSmartQuotes: AutoformatRule[]

Const autoformatSubscriptNumbers

autoformatSubscriptNumbers: AutoformatRule[]

Const autoformatSubscriptSymbols

autoformatSubscriptSymbols: AutoformatRule[]

Const autoformatSuperscriptNumbers

autoformatSuperscriptNumbers: AutoformatRule[]

Const autoformatSuperscriptSymbols

autoformatSuperscriptSymbols: AutoformatRule[]

Const comboboxActions

comboboxActions: SetRecord & { mergeState: MergeState; state: SetImmerState } & { open: (state: Pick<ComboboxState, "activeId" | "targetRange" | "text">) => void; reset: () => void; setComboboxById: <TData>(state: ComboboxStateById<TData>) => void }

Const comboboxSelectors

comboboxSelectors: StoreApiGet

Const comboboxStore

comboboxStore: StoreApi<"combobox", ComboboxState<undefined>, SetRecord & { mergeState: MergeState; state: SetImmerState } & { open: (state: Pick<ComboboxState, "activeId" | "targetRange" | "text">) => void; reset: () => void; setComboboxById: <TData>(state: ComboboxStateById<TData>) => void }, { isOpen: () => boolean }>

Const deserializeHtmlCodeBlock

deserializeHtmlCodeBlock: DeserializeHtml

Const eventEditorActions

eventEditorActions: StateActions

Const eventEditorSelectors

eventEditorSelectors: StoreApiGet

Const eventEditorStore

eventEditorStore: StoreApi

Store where the keys are event names and the values are editor ids.

Const grabberTooltipProps

grabberTooltipProps: TippyProps

Const hoveredColIndexAtom

hoveredColIndexAtom: Atom & { onMount?: <S>(setAtom: S) => void | (() => void); write: (get: { <Value>(atom: Atom<Value | Promise<Value>>): Value; <Value_1>(atom: Atom<Promise<Value_1>>): Value_1; <Value_2>(atom: Atom<Value_2>): Value_2 extends Promise<V> ? V : Value_2 } & { <Value_3>(atom: Atom<Value_3 | Promise<Value_3>>, unstable_promise: true): Value_3 | Promise<Value_3>; <Value_4>(atom: Atom<Promise<Value_4>>, unstable_promise: true): Value_4 | Promise<Value_4> }, set: { <Value_5, Result>(atom: WritableAtom<Value_5, undefined, Result>): Result; <Value_6, Update, Result_1>(atom: WritableAtom<Value_6, Update, Result_1>, update: Update): Result_1 }, update: number | ((prev: number | null) => number | null) | null) => void } & { init: number | null }

Const plateIdAtom

plateIdAtom: Atom & { onMount?: <S>(setAtom: S) => void | (() => void); write: (get: { <Value>(atom: Atom<Value | Promise<Value>>): Value; <Value_1>(atom: Atom<Promise<Value_1>>): Value_1; <Value_2>(atom: Atom<Value_2>): Value_2 extends Promise<V> ? V : Value_2 } & { <Value_3>(atom: Atom<Value_3 | Promise<Value_3>>, options: { unstable_promise: true }): Value_3 | Promise<Value_3>; <Value_4>(atom: Atom<Promise<Value_4>>, options: { unstable_promise: true }): Value_4 | Promise<Value_4>; <Value_5>(atom: Atom<Value_5>, options: { unstable_promise: true }): (Value_5 extends Promise<V> ? V : Value_5) | Promise<Value_5 extends Promise<V> ? V : Value_5> }, set: { <Value_6, Result>(atom: WritableAtom<Value_6, undefined, Result>): Result; <Value_7, Update, Result_1>(atom: WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1 }, update: string | ((prev: string | null) => string | null) | null) => void } & { init: string | null }

Const platesActions

platesActions: SetRecord & { mergeState: MergeState; state: SetImmerState } & { set: (id: string, state?: PlateProps<{}>) => void; unset: (id: string) => void }

Const platesSelectors

platesSelectors: StoreApiGet

Const platesStore

platesStore: StoreApi

Plates store.

Const resizingColAtom

resizingColAtom: Atom & { onMount?: <S>(setAtom: S) => void | (() => void); write: (get: { <Value>(atom: Atom<Value | Promise<Value>>): Value; <Value_1>(atom: Atom<Promise<Value_1>>): Value_1; <Value_2>(atom: Atom<Value_2>): Value_2 extends Promise<V> ? V : Value_2 } & { <Value_3>(atom: Atom<Value_3 | Promise<Value_3>>, unstable_promise: true): Value_3 | Promise<Value_3>; <Value_4>(atom: Atom<Promise<Value_4>>, unstable_promise: true): Value_4 | Promise<Value_4> }, set: { <Value_5, Result>(atom: WritableAtom<Value_5, undefined, Result>): Result; <Value_6, Update, Result_1>(atom: WritableAtom<Value_6, Update, Result_1>, update: Update): Result_1 }, update: { index: number; width: number } | ((prev: { index: number; width: number } | null) => { index: number; width: number } | null) | null) => void } & { init: { index: number; width: number } | null }

Const useComboboxSelectors

useComboboxSelectors: StoreApiUse

Const useEventEditorSelectors

useEventEditorSelectors: GetRecord

Const usePlatesSelectors

usePlatesSelectors: StoreApiUse

Const virtualReference

virtualReference: PopperJS.VirtualElement

Functions

Const BlockquoteElement

  • Parameters

    Returns Element

Const Button

  • Parameters

    Returns Element

Const ChevronDownIcon

  • Parameters

    Returns Element

Const CodeBlockElement

  • Parameters

    Returns Element

Const CodeBlockSelectElement

  • CodeBlockSelectElement(__namedParameters: { className?: string; css?: CSSProp<any>; lang?: string; onChange: Function }): null | Element
  • Parameters

    • __namedParameters: { className?: string; css?: CSSProp<any>; lang?: string; onChange: Function }
      • Optional className?: string
      • Optional css?: CSSProp<any>
      • Optional lang?: string
      • onChange: Function

    Returns null | Element

Const CodeLineElement

  • Parameters

    Returns Element

Const CodeSyntaxLeaf

  • CodeSyntaxLeaf(props: any, defaultRender?: (props?: any) => null | Element): null | Element
  • Parameters

    • props: any
    • Optional defaultRender: (props?: any) => null | Element
        • (props?: any): null | Element
        • Parameters

          • Optional props: any

          Returns null | Element

    Returns null | Element

Const ColorButton

  • ColorButton(__namedParameters: ColorButtonProps): Element
  • Parameters

    • __namedParameters: ColorButtonProps

    Returns Element

ColorInput

  • ColorInput(__namedParameters: React.PropsWithChildren<ColorInputProps>): JSX.Element
  • Parameters

    Returns JSX.Element

Const Colors

  • Colors(__namedParameters: ColorsProps): Element
  • Parameters

    • __namedParameters: ColorsProps

    Returns Element

Const Combobox

  • Combobox<TData>(__namedParameters: ComboboxProps<TData>): null | Element
  • Register the combobox id, trigger, onSelectItem Renders the combobox if active.

    Type parameters

    • TData: unknown = undefined

    Parameters

    Returns null | Element

Const CustomColors

  • CustomColors(__namedParameters: CustomColorsProps): Element
  • Parameters

    • __namedParameters: CustomColorsProps

    Returns Element

Const DefaultLeaf

Const DeleteIcon

  • Parameters

    Returns Element

Const Divider

  • Divider(props: HTMLAttributes<HTMLDivElement>): Element
  • Parameters

    • props: HTMLAttributes<HTMLDivElement>

    Returns Element

Const Draggable

  • Parameters

    Returns Element

Const EditablePlugins

  • EditablePlugins(props: Pick<PlateProps<{}>, "id">): Element
  • {@link Editable} with plugins support.

    Parameters

    Returns Element

Const EditorRefEffect

  • EditorRefEffect(__namedParameters: Pick<PlateProps<{}>, "id">): Element
  • Parameters

    Returns Element

Const EditorRefPluginEffect

  • EditorRefPluginEffect(__namedParameters: { plugin: WithPlatePlugin<{}, {}> }): null
  • Parameters

    Returns null

Const HrElement

  • Parameters

    Returns Element

Const ImageElement

  • Parameters

    Returns Element

Const ImageHandle

  • Parameters

    Returns Element

Const ImageToolbarButton

  • Parameters

    Returns Element

Const LinkElement

Const MediaEmbedElement

  • Parameters

    Returns Element

Const MediaEmbedToolbarButton

  • Parameters

    Returns Element

Const MediaEmbedUrlInput

  • MediaEmbedUrlInput(__namedParameters: { className?: string; css?: CSSProp<any>; onChange: Function; url: string }): Element
  • Parameters

    • __namedParameters: { className?: string; css?: CSSProp<any>; onChange: Function; url: string }
      • Optional className?: string
      • Optional css?: CSSProp<any>
      • onChange: Function
      • url: string

    Returns Element

Const MentionCombobox

  • Type parameters

    • TData: unknown = undefined

    Parameters

    Returns Element

Const MentionElement

  • Parameters

    Returns Element

Const MentionInputElement

  • Parameters

    Returns Element

Const Placeholder

  • Parameters

    Returns any

Const Plate

  • Type parameters

    • T: {} = {}

    Parameters

    Returns null | Element

Const PlateContent

  • PlateContent<T>(__namedParameters: PlateProps<T>): null | Element
  • Type parameters

    • T: {} = {}

    Parameters

    Returns null | Element

Const PlateEventProvider

  • PlateEventProvider(__namedParameters: { children: any; id?: string }): Element
  • Parameters

    • __namedParameters: { children: any; id?: string }
      • children: any
      • Optional id?: string

    Returns Element

Const PlateProvider

  • PlateProvider(__namedParameters: { children: any; id?: string }): null | Element
  • Parameters

    • __namedParameters: { children: any; id?: string }
      • children: any
      • Optional id?: string

    Returns null | Element

Const PlateTest

  • PlateTest(__namedParameters: { variant?: "comment" | "wordProcessor" } & PlateProps<{}>): Element
  • Parameters

    • __namedParameters: { variant?: "comment" | "wordProcessor" } & PlateProps<{}>

    Returns Element

Const Popover

  • Parameters

    Returns Element

Const PortalBody

  • Parameters

    Returns ReactPortal

Const RemoveNodeButton

  • Parameters

    Returns Element

Const SearchHighlightToolbar

  • Parameters

    Returns Element

Const StyledElement

  • StyledElement with no default styles.

    Parameters

    Returns Element

Const StyledLeaf

  • StyledLeaf with no default styles.

    Parameters

    Returns Element

Const TableCellElement

  • Parameters

    Returns Element

Const TableElement

  • Parameters

    Returns any

Const TableElementBase

  • Parameters

    Returns Element

Const TablePopover

  • Parameters

    Returns Element

Const TableRowElement

  • Parameters

    Returns Element

Const TodoListElement

  • Parameters

    Returns Element

Const ToolbarButton

  • Parameters

    Returns Element

Const ToolbarDropdown

  • ToolbarDropdown(__namedParameters: ToolbarDropdownProps): Element
  • Parameters

    • __namedParameters: ToolbarDropdownProps

    Returns Element

Const addColumn

  • Parameters

    Returns void

Const addRow

  • Parameters

    Returns void

Const applyDeepToNodes

  • Recursively apply an operation to children nodes with a query.

    Parameters

    Returns void

Const areEqListStyleType

  • areEqListStyleType(editor: TEditor<AnyObject>, entries: NodeEntry<Node>[], __namedParameters: { listStyleType?: string }): boolean
  • Parameters

    • editor: TEditor<AnyObject>
    • entries: NodeEntry<Node>[]
    • __namedParameters: { listStyleType?: string }
      • Optional listStyleType?: string

    Returns boolean

Const autoformatBlock

Const autoformatMark

Const autoformatText

Const cleanDocx

  • cleanDocx(html: string, rtf: string): string
  • Parameters

    • html: string
    • rtf: string

    Returns string

Const cleanDocxBrComments

  • cleanDocxBrComments(rootNode: Node): void
  • Remove HTML nodes between comments in the next sibling after BR.

    Parameters

    • rootNode: Node

    Returns void

Const cleanDocxEmptyParagraphs

  • cleanDocxEmptyParagraphs(rootNode: Node): void
  • Remove paragraph innerHTML if its child is 'O:P' with NO_BREAK_SPACE.

    Parameters

    • rootNode: Node

    Returns void

Const cleanDocxFootnotes

  • cleanDocxFootnotes(rootNode: Node): void
  • Replace docx footnotes with sup element.

    Parameters

    • rootNode: Node

    Returns void

Const cleanDocxImageElements

  • cleanDocxImageElements(document: Document, rtf: string, rootNode: Node): void
  • Clean docx image elements.

    Parameters

    • document: Document
    • rtf: string
    • rootNode: Node

    Returns void

Const cleanDocxListElements

  • cleanDocxListElements(rootNode: Node): void
  • Clean elements style mso-list to mso-list:Ignore

    Parameters

    • rootNode: Node

    Returns void

Const cleanDocxListElementsToList

  • cleanDocxListElementsToList(rootNode: Node): void
  • Parameters

    • rootNode: Node

    Returns void

Const cleanDocxQuotes

  • cleanDocxQuotes(rootNode: Node): void
  • Replace p.MsoQuote elements with blockquote.

    Parameters

    • rootNode: Node

    Returns void

Const cleanDocxSpacerun

  • cleanDocxSpacerun(element: Element): void
  • Replace the element with spaces if its style includes 'mso-spacerun: yes'.

    Parameters

    • element: Element

    Returns void

Const cleanDocxSpans

  • cleanDocxSpans(rootNode: Node): void
  • Clean docx spaceruns and tab counts.

    Parameters

    • rootNode: Node

    Returns void

Const cleanDocxTabCount

  • cleanDocxTabCount(element: Element): void
  • Replace element with tabs if its style starts with 'mso-tab-count'.

    Parameters

    • element: Element

    Returns void

Const cleanHtmlBrElements

  • cleanHtmlBrElements(rootNode: Node): void
  • Replace BR elements with line feeds.

    Parameters

    • rootNode: Node

    Returns void

Const cleanHtmlCrLf

  • cleanHtmlCrLf(html: string): string
  • Replace \r\n and \r with \n

    Parameters

    • html: string

    Returns string

Const cleanHtmlEmptyElements

  • cleanHtmlEmptyElements(rootNode: Node): void
  • Remove empty elements from rootNode. Allowed empty elements: BR, IMG.

    Parameters

    • rootNode: Node

    Returns void

Const cleanHtmlFontElements

  • cleanHtmlFontElements(rootNode: Node): void
  • Replace FONT elements with SPAN elements if there is textContent (remove otherwise).

    Parameters

    • rootNode: Node

    Returns void

Const cleanHtmlLinkElements

  • cleanHtmlLinkElements(rootNode: Node): void
  • Remove fragment hrefs and spans without inner text.

    Parameters

    • rootNode: Node

    Returns void

Const cleanHtmlTextNodes

  • cleanHtmlTextNodes(rootNode: Node): void
  • Parameters

    • rootNode: Node

    Returns void

Const copyBlockMarksToSpanChild

  • copyBlockMarksToSpanChild(rootNode: Node): void
  • Set HTML blocks mark styles to a new child span element if any. This allows Plate to use block marks.

    Parameters

    • rootNode: Node

    Returns void

Const createAlignPlugin

  • Creates a plugin that adds alignment functionality to the editor.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createAutoformatPlugin

Const createBasicElementsPlugin

  • Enables support for basic elements:

    • Block quote
    • Code block
    • Heading
    • Paragraph

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createBasicMarksPlugin

  • Enables support for basic marks:

    • Bold
    • Code
    • Italic
    • Strikethrough
    • Subscript
    • Superscript
    • Underline

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createBlockquotePlugin

  • Enables support for block quotes, useful for quotations and passages.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, HotkeyPlugin>

Const createBoldPlugin

Const createCodeBlockPlugin

Const createCodePlugin

Const createComboboxPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createDeserializeAstPlugin

  • Enables support for deserializing inserted content from Slate Ast format to Slate format while apply a small bug fix.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createDeserializeCsvPlugin

Const createDeserializeDocxPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createDeserializeHtmlPlugin

  • Enables support for deserializing inserted content from HTML format to Slate format.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createDeserializeMdPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createDndPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createDocumentNode

  • createDocumentNode(type?: string, text?: string, remaining?: any[]): any[]
  • Parameters

    • Optional type: string
    • Optional text: string
    • Optional remaining: any[]

    Returns any[]

Const createElementWithSlate

  • createElementWithSlate(slateProps?: Partial<SlateProps>): FunctionComponentElement<{ children: ReactNode; editor: ReactEditor; onChange: (value: Descendant[]) => void; value: Descendant[] }>
  • Create a React element wrapped in a Slate provider. By default, it will use an empty editor. TODO: allow other providers

    Parameters

    Returns FunctionComponentElement<{ children: ReactNode; editor: ReactEditor; onChange: (value: Descendant[]) => void; value: Descendant[] }>

Const createEventEditorPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createExitBreakPlugin

  • Insert soft break following configurable rules. Each rule specifies a hotkey and query options.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, ExitBreakPlugin>

Const createFindReplacePlugin

Const createFontBackgroundColorPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createFontColorPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createFontFamilyPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createFontSizePlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createFontWeightPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createHeadingPlugin

Const createHighlightPlugin

  • Enables support for highlights, useful when reviewing content or highlighting it for future reference.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, ToggleMarkPlugin>

Const createHistoryPlugin

  • see

    {@link withHistory}

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createHorizontalRulePlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createImagePlugin

Const createIndentListPlugin

Const createIndentPlugin

Const createInlineVoidPlugin

Const createInsertDataPlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createItalicPlugin

Const createJuicePlugin

  • Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createKbdPlugin

  • Enables support for code formatting

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createLineHeightPlugin

  • Enables support for text alignment, useful to align your content to left, right and center it.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createLinkPlugin

Const createListPlugin

  • Enables support for bulleted, numbered and to-do lists.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createMediaEmbedPlugin

  • Enables support for embeddable media such as YouTube or Vimeo videos, Instagram posts and tweets or Google Maps.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createMentionPlugin

  • Enables support for autocompleting @mentions.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, MentionPlugin<undefined>>

Const createNode

  • Parameters

    • Optional type: string
    • Optional text: string

    Returns TElement<AnyObject>

Const createNodeHOC

Const createNodeIdPlugin

Const createNodesHOC

  • createNodesHOC<T>(HOC: FunctionComponent<T>): (components: any, options: Options<T> | Options<T>[]) => any
  • Create components HOC by plugin key.

    Type parameters

    • T

    Parameters

    • HOC: FunctionComponent<T>

    Returns (components: any, options: Options<T> | Options<T>[]) => any

Const createNodesWithHOC

  • createNodesWithHOC<T>(withHOC: (component: any, props: T) => any): (components: any, options: Options<T> | Options<T>[]) => any
  • Create components HOC by plugin key with a custom HOC.

    Type parameters

    • T

    Parameters

    • withHOC: (component: any, props: T) => any
        • (component: any, props: T): any
        • Parameters

          • component: any
          • props: T

          Returns any

    Returns (components: any, options: Options<T> | Options<T>[]) => any

Const createNormalizeTypesPlugin

Const createParagraphPlugin

Const createPlateEditor

  • Create a plate editor with:

    • createEditor or custom editor
    • withPlate
    • custom components

    Type parameters

    • T = {}

    Parameters

    Returns PlateEditor<T>

Const createPlateStore

Const createPlateUI

Const createPlateUIEditor

  • Create a plate editor with default UI.

    Type parameters

    • T = {}

    Parameters

    Returns PlateEditor<T>

Const createPluginFactory

  • Create plugin factory with a default plugin.

    • first param is the default plugin.
    • the only required property of the default plugin is key.
    • returns a plugin factory:
      • first param override can be used to (deeply) override the default plugin.
      • second param overrideByKey can be used to (deeply) override by key a nested plugin (in plugin.plugins).

    Type parameters

    • P = {}

    Parameters

    Returns <T>(override?: Partial<PlatePlugin<T, NoInfer<P>>>, overrideByKey?: OverrideByKey<T>) => PlatePlugin<T, NoInfer<P>>

Const createPlugins

  • Creates a new array of plugins by overriding the plugins in the original array. Components can be overridden by key using components in the second param. Any other properties can be overridden by key using overrideByKey in the second param.

    Type parameters

    • T: {} = {}

    Parameters

    Returns PlatePlugin<T, {}>[]

Const createReactPlugin

  • see

    {@link withReact}

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createRemoveEmptyNodesPlugin

Const createResetNodePlugin

Const createSelectOnBackspacePlugin

Const createSingleLinePlugin

  • Forces editor to only have one line.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createSoftBreakPlugin

  • Insert soft break following configurable rules. Each rule specifies a hotkey and query options.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, SoftBreakPlugin>

Const createStrikethroughPlugin

Const createStyles

  • createStyles<T>(props: T, styles: NonNullable<T["styles"]> | NonNullable<T["styles"]>[]): { root: Style } & Record<keyof NonNullable<T["styles"]>, undefined | Style>
  • Type parameters

    • T: { classNames?: any; prefixClassNames?: string; styles?: NonNullable<T["styles"]> } = StyledProps<{}>

    Parameters

    • props: T
    • styles: NonNullable<T["styles"]> | NonNullable<T["styles"]>[]

    Returns { root: Style } & Record<keyof NonNullable<T["styles"]>, undefined | Style>

Const createSubscriptPlugin

Const createSuperscriptPlugin

Const createTablePlugin

  • Enables support for tables.

    Type parameters

    • T = {}

    Parameters

    Returns PlatePlugin<T, {}>

Const createTextIndentPlugin

Const createTodoListPlugin

Const createTrailingBlockPlugin

Const createUnderlinePlugin

Const decorateCodeLine

  • Parameters

    Returns (entry: NodeEntry<Node>) => undefined | BaseRange[]

      • (entry: NodeEntry<Node>): undefined | BaseRange[]
      • Parameters

        • entry: NodeEntry<Node>

        Returns undefined | BaseRange[]

Const decorateFindReplace

  • Parameters

    Returns (entry: NodeEntry<Node>) => undefined | BaseRange[]

      • (entry: NodeEntry<Node>): undefined | BaseRange[]
      • Parameters

        • entry: NodeEntry<Node>

        Returns undefined | BaseRange[]

Const defaultsDeepToNodes

  • Recursively merge a source object to children nodes with a query.

    Parameters

    Returns void

Const deleteBackwardList

  • deleteBackwardList(editor: PlateEditor<{}>, unit: "block" | "character" | "word" | "line"): boolean
  • Parameters

    • editor: PlateEditor<{}>
    • unit: "block" | "character" | "word" | "line"

    Returns boolean

Const deleteColumn

  • Parameters

    Returns void

Const deleteForwardList

  • Parameters

    Returns boolean

Const deleteFragment

  • deleteFragment(editor: TEditor<AnyObject>, options?: { at?: Location; distance?: number; hanging?: boolean; reverse?: boolean; test?: any; unit?: "block" | "character" | "word" | "line"; voids?: boolean }): void
  • Parameters

    • editor: TEditor<AnyObject>
    • Optional options: { at?: Location; distance?: number; hanging?: boolean; reverse?: boolean; test?: any; unit?: "block" | "character" | "word" | "line"; voids?: boolean }
      • Optional at?: Location
      • Optional distance?: number
      • Optional hanging?: boolean
      • Optional reverse?: boolean
      • Optional test?: any
      • Optional unit?: "block" | "character" | "word" | "line"
      • Optional voids?: boolean

    Returns void

Const deleteFragmentList

  • Parameters

    Returns boolean

Const deleteRow

  • Parameters

    Returns void

Const deleteStartSpace

  • If there is a whitespace character at the start of the code line, delete it.

    Parameters

    Returns boolean

Const deleteTable

  • Parameters

    Returns void

Const deserializeCsv

  • deserializeCsv<T>(editor: PlateEditor<T>, __namedParameters: { data: string; header?: boolean }): undefined | any[]
  • Type parameters

    • T = {}

    Parameters

    • editor: PlateEditor<T>
    • __namedParameters: { data: string; header?: boolean }
      • data: string
      • Optional header?: boolean

    Returns undefined | any[]

Const deserializeHtml

  • deserializeHtml<T>(editor: PlateEditor<T>, __namedParameters: { element: string | HTMLElement; stripWhitespace?: boolean }): any[]
  • Deserialize HTML element to a valid document fragment.

    Type parameters

    • T = {}

    Parameters

    • editor: PlateEditor<T>
    • __namedParameters: { element: string | HTMLElement; stripWhitespace?: boolean }
      • element: string | HTMLElement
      • Optional stripWhitespace?: boolean

    Returns any[]

Const deserializeHtmlElement

  • Deserialize HTML element to fragment.

    Type parameters

    • T = {}

    Parameters

    Returns DeserializeHtmlNodeReturnType

Const deserializeHtmlNode

Const deserializeHtmlNodeChildren

  • deserializeHtmlNodeChildren<T>(editor: PlateEditor<T>, node: ChildNode | HTMLElement): any[]
  • Type parameters

    • T = {}

    Parameters

    Returns any[]

Const deserializeMd

  • deserializeMd(editor: PlateEditor<{}>, data: string): any
  • Deserialize content from Markdown format to Slate format. editor needs

    Parameters

    Returns any

Const docxListToList

  • docxListToList(element: Element): Result
  • Parameters

    • element: Element

    Returns Result

Const elementToHtml

Const escapeRegExp

  • escapeRegExp(text: string): string
  • Parameters

    • text: string

    Returns string

Const exitBreak

  • Parameters

    Returns undefined | true

Const exitBreakAtEdges

  • exitBreakAtEdges(editor: TEditor<AnyObject>, __namedParameters: { end?: boolean; start?: boolean }): { isEdge: boolean; isStart: boolean; queryEdge: boolean }
  • Check if the selection is at the edge of its parent block. If it is and if the selection is expanded, delete its content.

    Parameters

    • editor: TEditor<AnyObject>
    • __namedParameters: { end?: boolean; start?: boolean }
      • Optional end?: boolean
      • Optional start?: boolean

    Returns { isEdge: boolean; isStart: boolean; queryEdge: boolean }

    • isEdge: boolean
    • isStart: boolean
    • queryEdge: boolean

filterBreaklines

  • filterBreaklines(item: any): boolean
  • Parameters

    • item: any

    Returns boolean

Const findDescendant

Const findHtmlElement

  • findHtmlElement(rootNode: Node, predicate: (node: HTMLElement) => boolean): null
  • Find the first HTML element that matches the given selector.

    Parameters

    • rootNode: Node
    • predicate: (node: HTMLElement) => boolean
        • (node: HTMLElement): boolean
        • Parameters

          • node: HTMLElement

          Returns boolean

    Returns null

Const findHtmlParentElement

  • findHtmlParentElement(el: null | HTMLElement, nodeName: string): null | HTMLElement
  • Parameters

    • el: null | HTMLElement
    • nodeName: string

    Returns null | HTMLElement

Const findMentionInput

Const findNode

Const findNodePath

  • findNodePath(editor: ReactEditor, node: TNode<AnyObject>): undefined | Path
  • see

    {@link ReactEditor.findPath}

    Parameters

    Returns undefined | Path

Const flattenDeepPlugins

  • Recursively merge plugin.plugins into editor.plugins and editor.pluginsByKey

    Type parameters

    • T = {}

    Parameters

    Returns void

Const focusBlockStartById

  • focusBlockStartById(editor: ReactEditor, id: string): void
  • Select the start of a block by id and focus the editor.

    Parameters

    • editor: ReactEditor
    • id: string

    Returns void

Const generateSpaces

  • generateSpaces(count: number): string
  • Parameters

    • count: number

    Returns string

Const generateTabs

  • generateTabs(count: number): string
  • Parameters

    • count: number

    Returns string

Const getAbove

Const getAndUpsertLink

  • getAndUpsertLink<T>(editor: PlateEditor<T>, getLinkUrl?: (prevUrl: null | string) => Promise<null | string>): Promise<void>
  • Type parameters

    • T = {}

    Parameters

    • editor: PlateEditor<T>
    • Optional getLinkUrl: (prevUrl: null | string) => Promise<null | string>
        • (prevUrl: null | string): Promise<null | string>
        • Parameters

          • prevUrl: null | string

          Returns Promise<null | string>

    Returns Promise<void>

Const getBalloonToolbarStyles

Const getBlockAbove

Const getBlockquoteElementStyles

  • Parameters

    Returns { root: Style } & Record<"root", undefined | Style>

Const getBlocksWithId

Const getButtonStyles

  • Parameters

    Returns { root: Style } & Record<"root", undefined | Style>

getCellInNextTableRow

  • getCellInNextTableRow(editor: TEditor, currentRowPath: Path): NodeEntry | undefined
  • Parameters

    • editor: TEditor
    • currentRowPath: Path

    Returns NodeEntry | undefined

getCellInPreviousTableRow

  • getCellInPreviousTableRow(editor: TEditor, currentRowPath: Path): NodeEntry | undefined
  • Parameters

    • editor: TEditor
    • currentRowPath: Path

    Returns NodeEntry | undefined

Const getChildren

  • getChildren<T>(nodeEntry: NodeEntry<T>): NodeEntry<any>[]
  • Get children node entries of a node entry. TODO: try Node.children

    Type parameters

    Parameters

    • nodeEntry: NodeEntry<T>

    Returns NodeEntry<any>[]

Const getCodeBlockElementStyles

  • Parameters

    Returns { root: Style } & Record<"root", undefined | Style>

Const getCodeLineElementStyles

  • Parameters

    Returns { root: Style } & Record<"root", undefined | Style>

Const getCodeLineEntry

  • If at (default = selection) is in ul>li>p, return li and ul node entries.

    Parameters

    • editor: PlateEditor<{}>
    • Optional __namedParameters: { at?: null | Location }
      • Optional at?: null | Location

    Returns undefined | { codeBlock: NodeEntry<TAncestor<AnyObject>>; codeLine: NodeEntry<TAncestor<AnyObject>> }

Const getCodeLineType

  • Type parameters

    • T = {}

    Parameters

    Returns string

Const getColorButtonStyles

  • getColorButtonStyles(props: ColorButtonStyleProps): { root: Style } & Record<never, undefined | Style>
  • Parameters

    • props: ColorButtonStyleProps

    Returns { root: Style } & Record<never, undefined | Style>

Const getColorInputStyles

  • Parameters

    Returns { root: Style } & Record<"input" | "root", undefined | Style>

Const getColorPickerStyles

  • getColorPickerStyles(): { root: Style } & Record<never, undefined | Style>
  • Returns { root: Style } & Record<never, undefined | Style>

Const getColorsStyles

  • getColorsStyles(): { root: Style } & Record<never, undefined | Style>
  • Returns { root: Style } & Record<never, undefined | Style>

Const getComboboxStoreById

  • Parameters

    • id: null | string

    Returns null | ComboboxStoreById<undefined>

Const getComboboxStyles

  • Type parameters

    • TData: unknown

    Parameters

    Returns { root: Style } & Record<"root" | keyof ComboboxStyles, undefined | Style>

Const getDeepInlineChildren

  • getDeepInlineChildren(editor: PlateEditor<{}>, __namedParameters: { children: NodeEntry<any>[] }): NodeEntry<any>[]
  • Recursively get all the:

    • block children
    • inline children except those at excludeDepth

    Parameters

    • editor: PlateEditor<{}>
    • __namedParameters: { children: NodeEntry<any>[] }
      • children: NodeEntry<any>[]

    Returns NodeEntry<any>[]

Const getDocxIndent

  • getDocxIndent(element: Element): number
  • Parameters

    • element: Element

    Returns number

Const getDocxListContentHtml

  • getDocxListContentHtml(rootElement: Element): string
  • Parameters

    • rootElement: Element

    Returns string

Const getDocxListIndent

  • getDocxListIndent(element: Element): number
  • Parameters

    • element: Element

    Returns number

Const getDocxListNode

  • getDocxListNode(element: Element): null | Node
  • Parameters

    • element: Element

    Returns null | Node

Const getDocxSpacing

  • getDocxSpacing(element: Element, cssProp: string): number
  • Parameters

    • element: Element
    • cssProp: string

    Returns number

Const getDocxTextIndent

  • getDocxTextIndent(element: Element): number
  • Parameters

    • element: Element

    Returns number

Const getDraggableStyles

Const getEmptyCellNode

  • getEmptyCellNode(editor: PlateEditor<{}>, __namedParameters: TablePluginOptions): { children: { children: { text: string }[]; type: string }[]; type: string }
  • Parameters

    Returns { children: { children: { text: string }[]; type: string }[]; type: string }

    • children: { children: { text: string }[]; type: string }[]
    • type: string

Const getEmptyRowNode

  • getEmptyRowNode(editor: PlateEditor<{}>, __namedParameters: TablePluginOptions & { colCount: number }): { children: { children: { children: { text: string }[]; type: string }[]; type: string }[]; type: string }
  • Parameters

    Returns { children: { children: { children: { text: string }[]; type: string }[]; type: string }[]; type: string }

    • children: { children: { children: { text: string }[]; type: string }[]; type: string }[]
    • type: string

Const getEmptyTableNode

  • getEmptyTableNode(editor: PlateEditor<{}>, __namedParameters: TablePluginOptions): { children: { children: { children: { children: { text: string }[]; type: string }[]; type: string }[]; type: string }[]; type: string }
  • Parameters