AttachOptions.onIntent
property · packages/richtext-dom/src/events.ts:219
readonly onIntent: (command: RichText.Command) => voidCalled with each semantic command the browser produced.
Rich text / foldkit-richtext-dom/events
interface · packages/richtext-dom/src/events.ts:217
interface AttachOptions {
readonly onIntent: (command: RichText.Command) => void
readonly onHistory?: (direction: 'undo' | 'redo') => void
readonly onSelection?: (selection: RichText.Selection | null) => void
readonly kit?: RichText.Kit | undefined
readonly keymap?: ReadonlyArray<KeyBinding> | undefined
readonly decorate?: Decorate | undefined
readonly placeholder?: string | undefined
readonly lineHint?: string | undefined
readonly nodes?: RichText.NodeRegistry | undefined
readonly onAction?:
((node: RichText.NodeId, action: string) => void) | undefined
}AttachOptions.onIntentproperty · packages/richtext-dom/src/events.ts:219
readonly onIntent: (command: RichText.Command) => voidCalled with each semantic command the browser produced.
AttachOptions.onHistoryproperty · packages/richtext-dom/src/events.ts:221
readonly onHistory?: (direction: 'undo' | 'redo') => voidCalled for undo and redo, which are editor intents rather than commands.
AttachOptions.onSelectionproperty · packages/richtext-dom/src/events.ts:227
readonly onSelection?: (selection: RichText.Selection | null) => voidCalled when the caret or range moves to a position the application did not just commit. Without it the editor never learns where the caret is; the adapter cannot follow a selection it is not told about.
AttachOptions.kitproperty · packages/richtext-dom/src/events.ts:232
readonly kit?: RichText.Kit | undefinedWhen given, imported HTML is constrained to this vocabulary: a node kind the Kit does not declare is degraded to a paragraph, never kept.
AttachOptions.keymapproperty · packages/richtext-dom/src/events.ts:234
readonly keymap?: ReadonlyArray<KeyBinding> | undefinedChords the application adds or overrides, checked before the built-ins.
AttachOptions.decorateproperty · packages/richtext-dom/src/events.ts:239
readonly decorate?: Decorate | undefinedWhat is drawn over the document (§129), derived from it each time it is synced — code highlighting, say. A pure read: it sees the document and nothing else.
AttachOptions.placeholderproperty · packages/richtext-dom/src/events.ts:241
readonly placeholder?: string | undefinedWhat a blank document shows (RichText.isBlank): "Write something…".
AttachOptions.lineHintproperty · packages/richtext-dom/src/events.ts:247
readonly lineHint?: string | undefinedWhat the empty paragraph a collapsed caret is in shows, as data-hint on it, which a
stylesheet draws as it draws the placeholder (usually only while the editor has the focus).
A blank document's block shows the placeholder instead.
AttachOptions.nodesproperty · packages/richtext-dom/src/events.ts:252
readonly nodes?: RichText.NodeRegistry | undefinedThe node vocabulary, which says where Tab means something (RichText.takesTab): code and
table cells take it as Indent and Outdent; anywhere else it moves focus as it always does.
AttachOptions.onActionproperty · packages/richtext-dom/src/events.ts:254
readonly onAction?:
((node: RichText.NodeId, action: string) => void) | undefinedCalled with a block and an adornment's action when that adornment is clicked.