@searsuite/sear-assembly-doc
Document plugin contracts
A Doc assembly chooses plugins for paragraphs, tables, inline styles, and line layout. For example,
ParagraphPlugin handles paragraph behavior and BoldTextStylePlugin contributes a bold inline style.
The Doc plugin contracts define what those plugins receive from the editor runtime; the node and selection values
they act on live in @searsuite/sear-domain-doc.
Import a feature plugin when composing the editor. Host controls should call its registered commands instead of changing document nodes directly.
- classDocPlugin
-
class DocPlugin<StateType> extends Plugin<SearCoreDoc, NodeProperties, StateType>, PluginExtension<DocCommandBus, ObservationRegistry, SessionStateRegistry, DocRuntimeExtensionRegistry>Convenience base class for a Plugin targeting createDocEditor().
constructor DocPlugin<StateType>(__namedParameters: PluginSpec<StateType>): DocPlugin<StateType>Creates a plugin with its stable identity and initial state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method initialize(context: DocPluginRuntimeContext): voidPrepares behavior that requires initialized Core state but must run before runtime effects.
method onEditorDestroy(context: DocPluginRuntimeContext): voidReleases resources owned by this plugin before the Core is destroyed.
method registerBlockFlows(registry: RichTextBlockFlowRegistry): voidRegisters plugin-owned top-level block flow resolvers.
method registerCapabilities(registry: DocRuntimeExtensionRegistry): voidPublishes typed runtime services owned by this document plugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerInlineStyleRenderers(registry: RichTextRunRenderRegistry): voidRegisters plugin-owned render behavior for styled text runs.
method registerInlineStyles(registry: RichTextInlineStyleRegistry): voidRegisters plugin-owned inline text style readers and mutation policies.
method registerKeyboardHandlers(context: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerLineBoxes(registry: RichTextLineBoxRegistry): voidRegisters plugin-owned rich-text line box resolvers.
method registerObservations(observations: ObservationRegistry): voidRegisters typed state and event observations owned by this document plugin.
method registerSessionState(registry: SessionStateRegistry): voidRegisters local state that must survive an in-memory editor remount.
method start(context: DocPluginRuntimeContext): voidStarts runtime behavior after the first document frame.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters bindings required before this Doc plugin is instantiated.
Inherited members 34
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classDocRuntimeExtensionRegistry
-
class DocRuntimeExtensionRegistry extends RuntimeCapabilityRegistryRegistry of extension capabilities available to document plugins.
constructor DocRuntimeExtensionRegistry(): DocRuntimeExtensionRegistryproperty readonly symbol: typeof symbolstaticDI token for resolving the document runtime extension registry.
Inherited members 7
Inherited from RuntimeCapabilityRegistry.
- interfaceDocPluginImplementation
-
interface DocPluginImplementation<TPlugin>Injectable DocPlugin class accepted by createDocEditor().
- interfaceDocPluginRuntime
-
Stable host capabilities supplied to a DocPlugin after editor assembly.
property readonly commands: DocCommandBusCommand bus exposed by the document editor instance.
property readonly document: { blockFlows: RichTextBlockFlowRegistry; core: SearCoreDoc; cursor: DocCursorManager; inlineStyles: RichTextInlineStyleRegistry; input: DocInputPlugin; layout: DocLayoutEngine; lineBoxes: RichTextLineBoxRegistry; nodes: DocNodeRegistry }Rich-document domain services.
property readonly events: { engine: EventEngine<NodeProperties>; registrar: EventRegistrar }Event and hit-test services used by document interactions.
property readonly extensions: DocRuntimeExtensionRegistryExtension capability registry for third-party document plugins.
property readonly input: { keyboard: KeyboardRouter; pointer: PointerCapture; text: TextInput }Host input adapters used by document editing commands.
property readonly observations: ObservationRegistryTyped state and event observations owned by this editor instance.
property readonly platform: PlatformPlatform adapter for timers, resize observation, and diagnostics.
property readonly plugins: PluginManager<SearCoreDoc, NodeProperties>Ordered document plugin registry for this editor.
property readonly render: { context: RenderContext; engine: DocRenderEngineCapability }Document render services and visible context.
property readonly scroll: { manager: ScrollManager }Scroll state shared by document layout and rendering.
property readonly session: SessionStateRegistryLocal remount state contributed by built-in and third-party plugins.
property readonly textShaper: TextShaperText shaper used by document layout and rendering.
- interfaceDocPluginRuntimeContext
-
interface DocPluginRuntimeContext extends DocPluginSetupContextDocument setup capabilities plus the Core created by createDocEditor().
property readonly core: SearCoreDocCore document runtime.
- interfaceDocPluginServiceContext
-
Services available while createDocEditor() registers document plugins.
property readonly container: ContainerDI container used by the document assembly root.
- interfaceDocPluginSetupContext
-
Typed public services available before createDocEditor() starts Core.
property readonly container: ContainerDI container used by the document assembly root.
property readonly runtime: DocPluginRuntimeRuntime services available to document plugins.
- typeDocRuntimeCapabilityReader
-
type DocRuntimeCapabilityReader = RuntimeCapabilityReaderRead-only view of editor-local document runtime capabilities exposed to hosts.
- typeDocRuntimeCapabilityToken
-
type DocRuntimeCapabilityToken = RuntimeCapability<T>Typed token used to publish and consume document runtime capabilities.
- variableDocCaretPluginKey
-
DocCaretPluginKey: PluginKey - variableDocCompositionPluginKey
-
DocCompositionPluginKey: PluginKey - variableDocContentRenderPluginKey
-
DocContentRenderPluginKey: PluginKeyDefault document feature plugin keys used by command pipelines.
- variableDocPluginRuntimeCapability
-
DocPluginRuntimeCapability: { CaretState: DocRuntimeCapability<DocCaretStateCapability>; Composition: DocRuntimeCapability<DocCompositionManager>; InputBindings: DocRuntimeCapability<DocInputBindingRegistryCapability>; Interaction: DocRuntimeCapability<DocInteractionRuntime> }Runtime extension tokens owned by document plugins assembled by editor composition roots.
- variableDocRuntimeCapability
-
DocRuntimeCapability: { BlockFlows: DocRuntimeCapability<RichTextBlockFlowRegistry>; Commands: DocRuntimeCapability<DocCommandBus>; Config: DocRuntimeCapability<ConfigEngine<any>>; Document: DocRuntimeCapability<{ blockFlows: RichTextBlockFlowRegistry; core: SearCoreDoc; cursor: DocCursorManager; inlineStyles: RichTextInlineStyleRegistry; input: DocInputPlugin; layout: DocLayoutEngine; lineBoxes: RichTextLineBoxRegistry; nodes: DocNodeRegistry }>; Events: DocRuntimeCapability<{ engine: EventEngine<NodeProperties>; registrar: EventRegistrar }>; InlineStyles: DocRuntimeCapability<RichTextInlineStyleRegistry>; Input: DocRuntimeCapability<{ keyboard: KeyboardRouter; pointer: PointerCapture; text: TextInput }>; LayoutService: DocRuntimeCapability<DocRenderLayoutServiceCapability>; … }Document runtime capabilities registered by the default assembly root.
- variableDocSelectionPluginKey
-
DocSelectionPluginKey: PluginKey
Document input
- interfaceDocCaretStateCapability
-
Caret-state capability consumed by document plugins.
method isVisible(): booleanmethod reset(): void - interfaceDocInputBindingRegistryCapability
-
Input-binding capability consumed by document plugins.
- interfaceDocInteractionContentRect
-
interface DocInteractionContentRect extends DocInteractionViewportCurrent document content rectangle exposed to interaction plugins.
property readonly x: numberproperty readonly y: number - interfaceDocInteractionRuntime
-
View services exposed to document interaction plugins.
method getContentRect(): DocInteractionContentRectmethod getRoot(): unknownmethod getViewport(): DocInteractionViewportmethod readRootViewOffset(): { x: number; y: number }method resolveCursorFromPointer(input: DocPointerInput): DocCursorPosmethod subscribePointerDrag(handlers: DocPointerDragHandlers): (): void - interfaceDocInteractionViewport
-
Current document viewport model exposed to interaction plugins.
property readonly height: numberproperty readonly width: number - interfaceDocKeyboardHandlerRegistrationContext
-
Services available while a Doc plugin registers keyboard bindings.
property readonly bindings: DocInputBindingRegistryCapabilityAggregates plugin-owned keyboard handlers for the host adapter.
property readonly commands: DocCommandBusExecutes semantic editor commands from keyboard handlers.
- interfaceDocPointerDragHandlers
-
Document pointer-drag lifecycle consumed by interaction plugins.
- interfaceDocPointerInput
-
Pointer input used by document interaction plugins.
Document rendering
- interfaceDocRenderEngineCapability
-
Render-engine surface exposed to Doc plugins.
- interfaceDocRenderLayoutServiceCapability
-
Public layout-service surface exposed to Doc plugins and hosts.
- interfaceDocVirtualLayoutSummary
-
Public virtual layout summary exposed through the Doc layout-service capability.
property readonly blockRender?: DocBlockRenderDebugSnapshotproperty readonly cacheHits: numberproperty readonly cacheMisses: numberproperty readonly cursorBlock: number | nullproperty readonly documentHeight: numberproperty readonly heightIndexUpdated: booleanproperty readonly initialLoadMs?: numberproperty readonly materializedBlocks: numberproperty readonly materializedIndexes: stringproperty readonly model: "reused" | "rebuilt"property readonly rangeEnd: numberproperty readonly rangeStart: numberproperty readonly renderPhase?: DocVirtualLayoutRenderPhaseproperty readonly timings: DocVirtualLayoutTimingSummaryproperty readonly totalBlocks: number - interfaceDocVirtualLayoutTimingSummary
-
Timing summary reported by virtual document layout instrumentation.
property readonly cursorSelectionMs: numberproperty readonly documentModelMs: numberproperty readonly heightCorrectionMs: numberproperty readonly materializeBlocksMs: numberproperty readonly renderPrepareMode?: "full" | "viewport"property readonly renderPrepareMs?: numberproperty readonly snapshotCacheMs: numberproperty readonly viewportRangeMs: numberproperty readonly virtualLayoutTotalMs: number - typeDocVirtualLayoutRenderPhase
-
type DocVirtualLayoutRenderPhase = "initial" | "realtime"Render phase reported by virtual document layout instrumentation.
- typeDocVirtualLayoutSummaryListener
-
type DocVirtualLayoutSummaryListener = (summary: DocVirtualLayoutSummary): voidListener notified when the virtual layout summary changes.
Register document extensions
Use DocNodeRegistry for document node creation, RichTextInlineStyleRegistry for inline style behavior,
RichTextLineBoxRegistry for line layout, and RichTextBlockFlowRegistry for block flow. A Doc plugin registers
its own contributions at assembly time. DocRuntimeExtensionRegistry exposes editor-local capabilities needed
by plugins and hosts without sharing one global runtime.
- functioncreateDocCommand
-
createDocCommand(id: string, renderPluginKey: PluginKey | readonly PluginKey[], createTransaction?: (): Transaction, effects?: readonly DocCommandEffect[] | undefined, localAction?: (): void): DocEditorCommandCreates a pipeline-backed document command with an optional transaction or local action.
- functiondefineDocRuntimeCapability
-
defineDocRuntimeCapability<T>(id: string): DocRuntimeCapability<T>Creates a typed document runtime capability token.
- functionregisterDocPluginBlockFlows
-
registerDocPluginBlockFlows(plugins: readonly unknown[], registry: RichTextBlockFlowRegistry): (): voidRegisters every top-level block flow contribution owned by document plugins.
- functionregisterDocPluginCapabilities
-
registerDocPluginCapabilities(plugins: readonly unknown[], registry: DocRuntimeExtensionRegistry): voidPublishes every typed runtime capability contributed by document plugins.
- functionregisterDocPluginCommands
-
registerDocPluginCommands(plugins: readonly unknown[], commands: DocCommandBus): (): void - functionregisterDocPluginInlineStyleRenderers
-
registerDocPluginInlineStyleRenderers(plugins: readonly unknown[], registry: RichTextRunRenderRegistry): (): voidRegisters every rich-text run renderer contributed by document plugins.
- functionregisterDocPluginInlineStyles
-
registerDocPluginInlineStyles(plugins: readonly unknown[], registry: RichTextInlineStyleRegistry): (): voidRegisters every inline text-style contribution owned by document plugins.
- functionregisterDocPluginKeyboardHandlers
-
registerDocPluginKeyboardHandlers(plugins: readonly unknown[], context: DocKeyboardHandlerRegistrationContext): (): voidRegisters every keyboard binding contributed by document plugins.
- functionregisterDocPluginLineBoxes
-
registerDocPluginLineBoxes(plugins: readonly unknown[], registry: RichTextLineBoxRegistry): (): voidRegisters every rich-text line box contribution owned by document plugins.
- functionregisterDocPluginObservations
-
registerDocPluginObservations(plugins: readonly unknown[], observations: ObservationRegistry): voidRegisters every typed observation source contributed by document plugins.
- functionregisterDocPluginSessionStates
-
registerDocPluginSessionStates(plugins: readonly unknown[], registry: SessionStateRegistry): voidRegisters every local session-state adapter contributed by document plugins.
Blocks and tables
- classParagraphPlugin
-
class ParagraphPlugin extends DocPlugin<null>Registers paragraph and text node model support plus block-level commands.
constructor ParagraphPlugin(): ParagraphPluginproperty readonly symbol: typeof symbolstaticDI token for resolving ParagraphPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerBlockFlows(registry: RichTextBlockFlowRegistry): voidRegisters plugin-owned top-level block flow resolvers.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerLineBoxes(registry: RichTextLineBoxRegistry): voidRegisters plugin-owned rich-text line box resolvers.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters paragraph node model support owned by this plugin.
Inherited members 37
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- classTablePlugin
-
class TablePlugin extends DocPlugin<null>Contributes table model and insertion command without adding table knowledge to Core.
constructor TablePlugin(): TablePluginproperty readonly symbol: typeof symbolstaticDI token for resolving TablePlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters table node model support owned by this plugin.
Inherited members 40
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- classRichTextLineBoxPlugin
-
class RichTextLineBoxPlugin extends DocPlugin<null>Registers rich-text line box resolution for document layout.
constructor RichTextLineBoxPlugin(): RichTextLineBoxPluginproperty readonly symbol: typeof symbolstaticDI token for resolving RichTextLineBoxPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method registerLineBoxes(registry: RichTextLineBoxRegistry): voidRegisters plugin-owned rich-text line box resolvers.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
Inherited members 43
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerCommands
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- interfaceInsertDocTableInput
-
Input accepted by InsertDocTableCommand.
property readonly columns: numberNumber of columns in the inserted table.
property readonly rows: numberNumber of rows in the inserted table.
- interfaceSetDocLineSpacingInput
-
Input accepted by SetDocLineSpacingCommand. Null clears the paragraph override.
- interfaceSetDocParagraphSpacingAfterInput
-
Input accepted by SetDocParagraphSpacingAfterCommand. Null clears the paragraph override.
- variableInsertDocTableCommand
-
InsertDocTableCommand: DocCommandDefinition<InsertDocTableInput, DocCommandResult>Inserts a table block at the current document position.
- variableSetDocLineSpacingCommand
-
SetDocLineSpacingCommand: DocCommandDefinition<SetDocLineSpacingInput, DocCommandResult>Sets or clears line-spacing overrides on the selected paragraphs.
- variableSetDocParagraphSpacingAfterCommand
-
SetDocParagraphSpacingAfterCommand: DocCommandDefinition<SetDocParagraphSpacingAfterInput, DocCommandResult>Sets or clears after-spacing overrides on the selected paragraphs.
- variableSplitDocParagraphCommand
-
SplitDocParagraphCommand: DocCommandDefinition<void, DocCommandResult>Splits the current paragraph at the current document selection.
Text style definitions
Style keys identify the attributes stored on inline text runs.
- classBoldTextStylePlugin
-
class BoldTextStylePlugin extends InlineTextStylePluginBaseContributes bold rendering and bold document commands.
constructor BoldTextStylePlugin(): BoldTextStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving BoldTextStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- enumBoldTextStyleKey
-
Persisted style key owned by the bold text-style plugin.
enum member Bold: "bold" - enumFontFamilyTextStyleKey
-
Persisted style key owned by the font-family text-style plugin.
enum member FontFamily: "fontFamily" - enumFontSizeTextStyleKey
-
Persisted style key owned by the font-size text-style plugin.
enum member FontSize: "fontSize" - enumItalicTextStyleKey
-
enum member Italic: "italic" - enumStrikethroughTextStyleKey
-
enum member Strikethrough: "strikethrough" - enumTextColorStyleKey
-
Persisted style key owned by the text-color style plugin.
enum member Color: "color" - enumUnderlineTextStyleKey
-
enum member Underline: "underline" - classFontFamilyTextStylePlugin
-
class FontFamilyTextStylePlugin extends InlineTextStylePluginBaseContributes font-family rendering and the set-font-family document command.
constructor FontFamilyTextStylePlugin(): FontFamilyTextStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving FontFamilyTextStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
Inherited members 47
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classFontSizeTextStylePlugin
-
class FontSizeTextStylePlugin extends InlineTextStylePluginBaseContributes font-size rendering and the set-font-size document command.
constructor FontSizeTextStylePlugin(): FontSizeTextStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving FontSizeTextStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
Inherited members 47
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classInlineTextStylePluginBase
-
class InlineTextStylePluginBase extends DocPlugin<null>Shared lifecycle helper for concrete inline style plugins.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerInlineStyleRenderers(registry: RichTextRunRenderRegistry): voidRegisters plugin-owned render behavior for styled text runs.
method registerInlineStyles(registry: RichTextInlineStyleRegistry): voidRegisters plugin-owned inline text style readers and mutation policies.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
Inherited members 40
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerCommands
- registerConfig
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classItalicTextStylePlugin
-
class ItalicTextStylePlugin extends InlineTextStylePluginBaseContributes italic rendering, mutation, and keyboard commands.
constructor ItalicTextStylePlugin(): ItalicTextStylePluginproperty readonly symbol: typeof symbolstaticmethod registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classStrikethroughTextStylePlugin
-
class StrikethroughTextStylePlugin extends InlineTextStylePluginBaseContributes strikethrough rendering, mutation, and keyboard commands.
constructor StrikethroughTextStylePlugin(): StrikethroughTextStylePluginproperty readonly symbol: typeof symbolstaticmethod registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classTextColorStylePlugin
-
class TextColorStylePlugin extends InlineTextStylePluginBaseContributes text-color rendering and mutation for text nodes.
constructor TextColorStylePlugin(): TextColorStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving TextColorStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
Inherited members 47
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classUnderlineTextStylePlugin
-
class UnderlineTextStylePlugin extends InlineTextStylePluginBaseContributes underline rendering, mutation, and keyboard commands.
constructor UnderlineTextStylePlugin(): UnderlineTextStylePluginproperty readonly symbol: typeof symbolstaticmethod registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
Style commands
- interfaceSetDocBoldInput
-
Input accepted by SetDocBoldCommand. A null or false value clears bold.
property readonly bold: boolean | null - interfaceSetDocFontFamilyInput
-
Input accepted by SetDocFontFamilyCommand. A null or empty value clears the font family.
- interfaceSetDocFontSizeInput
-
Input accepted by SetDocFontSizeCommand. A null or empty value clears the font size.
property readonly fontSize: number | null - interfaceSetDocItalicInput
-
property readonly italic: boolean | null - interfaceSetDocStrikethroughInput
- interfaceSetDocTextColorInput
-
Input accepted by SetDocTextColorCommand. A null or empty value clears the text color.
property readonly color: string | null - interfaceSetDocUnderlineInput
- variableSetDocBoldCommand
-
SetDocBoldCommand: DocCommandDefinition<SetDocBoldInput, DocCommandResult>Sets whether the selected document text is bold.
- variableSetDocFontFamilyCommand
-
SetDocFontFamilyCommand: DocCommandDefinition<SetDocFontFamilyInput, DocCommandResult>Sets the font family on the selected document text.
- variableSetDocFontSizeCommand
-
SetDocFontSizeCommand: DocCommandDefinition<SetDocFontSizeInput, DocCommandResult>Sets the font size in pixels on the selected document text.
- variableSetDocItalicCommand
-
SetDocItalicCommand: DocCommandDefinition<SetDocItalicInput, DocCommandResult> - variableSetDocStrikethroughCommand
-
SetDocStrikethroughCommand: DocCommandDefinition<SetDocStrikethroughInput, DocCommandResult> - variableSetDocTextColorCommand
-
SetDocTextColorCommand: DocCommandDefinition<SetDocTextColorInput, DocCommandResult>Sets the text color on the selected document text.
- variableSetDocUnderlineCommand
-
SetDocUnderlineCommand: DocCommandDefinition<SetDocUnderlineInput, DocCommandResult> - variableToggleDocBoldCommand
-
ToggleDocBoldCommand: DocCommandDefinition<void, DocCommandResult>Toggles bold on the selected document text.
- variableToggleDocItalicCommand
-
ToggleDocItalicCommand: DocCommandDefinition<void, DocCommandResult> - variableToggleDocStrikethroughCommand
-
ToggleDocStrikethroughCommand: DocCommandDefinition<void, DocCommandResult> - variableToggleDocUnderlineCommand
-
ToggleDocUnderlineCommand: DocCommandDefinition<void, DocCommandResult>
Style contributions
- functioncreateBoldContribution
-
createBoldContribution(): RichTextInlineStyleContributionCreates the shared bold inline style contribution.
- functioncreateBoldRenderContribution
-
createBoldRenderContribution(): RichTextRunRenderContributionCreates the render-layer bold contribution.
- functioncreateFontFamilyContribution
-
createFontFamilyContribution(): RichTextInlineStyleContributionCreates the shared font-family inline style contribution.
- functioncreateFontFamilyRenderContribution
-
createFontFamilyRenderContribution(): RichTextRunRenderContributionCreates the render-layer font-family contribution.
- functioncreateFontSizeContribution
-
createFontSizeContribution(): RichTextInlineStyleContributionCreates the shared font-size inline style contribution.
- functioncreateFontSizeRenderContribution
-
createFontSizeRenderContribution(): RichTextRunRenderContributionCreates the render-layer font-size contribution.
- functioncreateItalicContribution
-
createItalicContribution(): RichTextInlineStyleContribution - functioncreateItalicRenderContribution
-
createItalicRenderContribution(): RichTextRunRenderContributionCreates the render-layer italic contribution.
- functioncreateStrikethroughContribution
-
createStrikethroughContribution(): RichTextInlineStyleContribution - functioncreateStrikethroughRenderContribution
-
createStrikethroughRenderContribution(): RichTextRunRenderContributionCreates the render-layer strikethrough contribution.
- functioncreateTextColorContribution
-
createTextColorContribution(): RichTextInlineStyleContributionCreates the shared text-color inline style contribution.
- functioncreateTextColorRenderContribution
-
createTextColorRenderContribution(): RichTextRunRenderContributionCreates the render-layer text-color contribution.
- functioncreateUnderlineContribution
-
createUnderlineContribution(): RichTextInlineStyleContribution - functioncreateUnderlineRenderContribution
-
createUnderlineRenderContribution(): RichTextRunRenderContributionCreates the render-layer underline contribution.
Editing commands
- interfaceInsertDocTextInput
-
Input accepted by InsertDocTextCommand.
property readonly text: stringText to insert at the current document selection.
- interfaceLoadDocumentInput
-
Input accepted by LoadDocumentCommand.
property readonly document: RichDocNode[]Rich-document content to load into the document editor.
- interfaceMoveDocCursorInput
-
Input accepted by MoveDocCursorCommand.
property readonly direction: DocCursorDirectionDirection for cursor movement.
property readonly shiftKey?: booleanWhether the movement should extend the current selection.
- interfaceSetDocCompositionInput
-
Input accepted by SetDocCompositionCommand.
property readonly caretOffset: numberCaret offset inside the composing text.
property readonly text: stringCurrent composing text emitted by the host input method.
- interfaceSetDocSelectionInput
-
Input accepted by SetDocSelectionCommand.
property readonly selection: DocSelectionSelection to make active in the document editor.
- variableClearDocCompositionCommand
-
ClearDocCompositionCommand: DocCommandDefinition<void, DocCommandResult>Clears the active IME composition preview text.
- variableDeleteDocBackwardCommand
-
DeleteDocBackwardCommand: DocCommandDefinition<void, DocCommandResult>Deletes content before the current document selection.
- variableFocusDocCommand
-
FocusDocCommand: DocCommandDefinition<void, DocCommandResult>Focuses the host text-input adapter for the document editor.
- variableInsertDocTextCommand
-
InsertDocTextCommand: DocCommandDefinition<InsertDocTextInput, DocCommandResult>Inserts text at the current document selection.
- variableLoadDocumentCommand
-
LoadDocumentCommand: DocCommandDefinition<LoadDocumentInput, DocCommandResult>Replaces the active document content.
- variableMoveDocCursorCommand
-
MoveDocCursorCommand: DocCommandDefinition<MoveDocCursorInput, DocCommandResult>Moves the current document cursor.
- variableRenderDocCommand
-
RenderDocCommand: DocCommandDefinition<void, DocCommandResult>Requests a document render without changing content.
- variableSelectAllDocCommand
-
SelectAllDocCommand: DocCommandDefinition<void, DocCommandResult>Selects all document content.
- variableSetDocCompositionCommand
-
SetDocCompositionCommand: DocCommandDefinition<SetDocCompositionInput, DocCommandResult>Sets the active IME composition preview text.
- variableSetDocSelectionCommand
-
SetDocSelectionCommand: DocCommandDefinition<SetDocSelectionInput, DocCommandResult>Sets the active document selection without changing content.
No matching API entries.