Rich text / foldkit-richtext-dom/editor-bundle

EditorPlacement

interface · packages/richtext-dom/src/editor-bundle.ts:688

interface EditorPlacement {
  readonly rendering?: RichText.Rendering | undefined
  readonly vocabulary?: Vocabulary | undefined
  readonly inputRules?: ReadonlyArray<RichText.InputRule> | undefined
  readonly decorate?: Decorate | undefined
  readonly placeholder?: string | undefined
  readonly lineHint?: string | undefined
  readonly slashEntries?: ReadonlyArray<SlashEntry<EditorEvent>> | undefined
  readonly serverRendered?: (() => boolean) | undefined
}

What a placement gives its editor. Each is placed by host id rather than passed as an arg (§122): each holds functions or schemas, which a schema-decoded arg cannot describe.

Members

EditorPlacement.rendering

property · packages/richtext-dom/src/editor-bundle.ts:690

readonly rendering?: RichText.Rendering | undefined

How this editor's marks and node kinds render (§121). Defaults to noRendering.

EditorPlacement.vocabulary

property · packages/richtext-dom/src/editor-bundle.ts:692

readonly vocabulary?: Vocabulary | undefined

The vocabulary its edits resolve against (§125). Defaults to none.

EditorPlacement.inputRules

property · packages/richtext-dom/src/editor-bundle.ts:694

readonly inputRules?: ReadonlyArray<RichText.InputRule> | undefined

The rules applied to what is typed (§128). Defaults to none.

EditorPlacement.decorate

property · packages/richtext-dom/src/editor-bundle.ts:699

readonly decorate?: Decorate | undefined

What is drawn over the document (§129), derived from it on every patch: code highlighting, for one. Defaults to nothing.

EditorPlacement.placeholder

property · packages/richtext-dom/src/editor-bundle.ts:701

readonly placeholder?: string | undefined

What the editor shows while its document is blank (RichText.isBlank). Defaults to none.

EditorPlacement.lineHint

property · packages/richtext-dom/src/editor-bundle.ts:706

readonly lineHint?: string | undefined

What the empty paragraph the caret is in shows, such as "Type / for blocks", as data-hint on it. Defaults to none.

EditorPlacement.slashEntries

property · packages/richtext-dom/src/editor-bundle.ts:712

readonly slashEntries?: ReadonlyArray<SlashEntry<EditorEvent>> | undefined

What its slash menu offers, which Enter resolves against: an application's own entries (an image, a table, a callout) beside or instead of slashEntries. The application's menu view draws the same list. Defaults to slashEntries.

EditorPlacement.serverRendered

property · packages/richtext-dom/src/editor-bundle.ts:718

readonly serverRendered?: (() => boolean) | undefined

Whether this render is the server's (§145), such as foldkit-ssr's SSR.serving. While it is, the host carries the document's markup, which the browser's editor adopts instead of drawing again. Defaults to never, so the host is empty until the editor mounts.