AttachOptions.onIntent
property · packages/richtext-dom/src/events.ts:223
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:221
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 label?: string | undefined
readonly labelledBy?: 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:223
readonly onIntent: (command: RichText.Command) => voidCalled with each semantic command the browser produced.
AttachOptions.onHistoryproperty · packages/richtext-dom/src/events.ts:225
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:231
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:236
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:238
readonly keymap?: ReadonlyArray<KeyBinding> | undefinedChords the application adds or overrides, checked before the built-ins.
AttachOptions.decorateproperty · packages/richtext-dom/src/events.ts:243
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:245
readonly placeholder?: string | undefinedWhat a blank document shows (RichText.isBlank): "Write something…".
AttachOptions.labelproperty · packages/richtext-dom/src/events.ts:247
readonly label?: string | undefinedThe editor's accessible name, as aria-label on the editable root.
AttachOptions.labelledByproperty · packages/richtext-dom/src/events.ts:252
readonly labelledBy?: string | undefinedThe id of the element that names the editor, as aria-labelledby. Without a label or this,
the editor takes the name of the group it is drawn in (the label a form gives its control).
AttachOptions.lineHintproperty · packages/richtext-dom/src/events.ts:258
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:263
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:265
readonly onAction?:
((node: RichText.NodeId, action: string) => void) | undefinedCalled with a block and an adornment's action when that adornment is clicked.