← All packages

@searsuite/sear-plugin-sheet-doc-adapter

The default Doc-backed rich-text editor adapter for Sheet cells.

Embedded document editor

classSearCoreEditorAdapter
class SearCoreEditorAdapter extends SheetEmbeddedEditor

Sheet adapter that owns one lightweight SearCoreDoc for all embedded cells.

interfaceEmbeddedDocConfig

Configuration for the Doc instance embedded inside a Sheet cell.

propertyreadonly fontFamily: string

Default font family and fallback list used by the active embedded document editor.

propertyreadonly fontSize: number

Default font size used by the active embedded document editor.

propertyreadonly padding: number

Padding between the cell edge and embedded document text.

interfaceSearCoreEditorAdapterOptions

Configuration for the Sheet-specific SearCore document adapter.

propertyreadonly embeddedDocConfig?: Partial<EmbeddedDocConfig>

Configuration scoped to the Doc embedded inside a Sheet cell.

propertyreadonly plugins?: readonly SheetEmbeddedEditorPlugin | SheetEmbeddedEditorPluginImplementation[]

Optional Sheet-only plugins. Defaults to the built-in adapter plugins.

interfaceSheetEmbeddedEditorPlugin

Extension point for behavior that belongs to the Sheet embedding rather than the reusable Doc runtime. Plugins are deliberately expressed in contract types so they can be replaced without changing Sheet or Doc packages.

propertyreadonly key: string

Stable identity used to reject duplicate registrations.

methoddispose(): void

Called before the adapter releases this plugin.

methodinitialize(context: SheetEmbeddedEditorPluginContext): void

Called once when the adapter is initialized.

methodonCancel(context: SheetEmbeddedEditorPluginContext): void

Called after an edit is cancelled.

methodonCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): void

Called after Sheet has committed the edited document.

methodonRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): void

Called after a render pass has completed.

methodtransformCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): void | SheetDocument | null

Allows a Sheet plugin to normalize the snapshot at the commit boundary.

methodtransformInlineStyle(update: SheetInlineStyleUpdate, context: SheetEmbeddedEditorPluginContext): void | SheetInlineStyleUpdate | null

Allows a plugin to normalize an inline style update before Doc input runs.

methodtransformInput(input: SheetEditInput, context: SheetEmbeddedEditorPluginContext): void | SheetEditInput | null

Allows a plugin to normalize or consume Sheet keyboard/text input.

interfaceSheetEmbeddedEditorPluginContext

Context delivered to Sheet-specific embedded-editor plugins.

interfaceSheetEmbeddedEditorPluginImplementation

Constructor form accepted by adapter configuration for stateless plugins.

variabledefaultEmbeddedDocConfig
defaultEmbeddedDocConfig: EmbeddedDocConfig

Built-in defaults for a Doc instance embedded inside a Sheet cell.

functioncreateSheetEmbeddedSearCoreEditor
createSheetEmbeddedSearCoreEditor(options?: SearCoreEditorAdapterOptions): SearCoreEditorAdapter

Creates the lightweight SearCore editor used by Sheet embedded cells.

functionregisterSheetEmbeddedInlineStyleObservation
registerSheetEmbeddedInlineStyleObservation(observations: ObservationRegistry, input: DocInputPlugin, inlineStyles: RichTextInlineStyleRegistry, isEditing: (): boolean, readTypingStyle?: (): Readonly<Record<string, unknown>>): SheetEmbeddedInlineStyleObservationController

Registers the selection-derived inline-style state with an embedded editor.

Sheet integration plugins

classSheetCellContextPlugin
class SheetCellContextPlugin extends SheetEmbeddedEditorPlugin

Adapts Sheet cell geometry and pointer coordinates for embedded sessions.

classSheetClipboardPlugin
class SheetClipboardPlugin extends SheetEmbeddedEditorPlugin

Sheet clipboard codec for the shared rich-document snapshot protocol.

classSheetDocIntegrationPlugin
class SheetDocIntegrationPlugin extends SheetEmbeddedEditorPlugin

Extension point for Sheet-to-Doc integration policies.

constructorSheetDocIntegrationPlugin(): SheetDocIntegrationPlugin
propertyreadonly key: "sheet.doc-integration"

Stable identity used to reject duplicate registrations.

classSheetFormulaReferencePlugin
class SheetFormulaReferencePlugin extends SheetEmbeddedEditorPlugin

Finds formula-like references for Sheet overlays without changing document data.

constructorSheetFormulaReferencePlugin(): SheetFormulaReferencePlugin
propertyreadonly key: "sheet.formula-reference"

Stable identity used to reject duplicate registrations.

methoddispose(): void

Called before the adapter releases this plugin.

methodgetReferences(): readonly string[]
methodinitialize(context: SheetEmbeddedEditorPluginContext): void

Called once when the adapter is initialized.

methodonRender(_update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): void

Called after a render pass has completed.

classSheetOverflowPlugin
class SheetOverflowPlugin extends SheetEmbeddedEditorPlugin

Keeps overflow sizing as a Sheet concern and requests geometry redraws.

constructorSheetOverflowPlugin(): SheetOverflowPlugin
propertyreadonly key: "sheet.overflow"

Stable identity used to reject duplicate registrations.

methoddispose(): void

Called before the adapter releases this plugin.

methodgetContentSize(): { height: number; width: number } | null
methodonCommit(_document: SheetDocument, _context: SheetEmbeddedEditorPluginContext): void

Called after Sheet has committed the edited document.

methodonRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): void

Called after a render pass has completed.

classSheetShortcutPlugin
class SheetShortcutPlugin extends SheetEmbeddedEditorPlugin

Optional key mapping hook for Sheet hosts that add cell-navigation shortcuts.

constructorSheetShortcutPlugin(shortcuts?: Readonly<Record<string, SheetEditInput>>): SheetShortcutPlugin
propertyreadonly key: "sheet.shortcuts"

Stable identity used to reject duplicate registrations.

methodtransformInput(input: SheetEditInput, _context: SheetEmbeddedEditorPluginContext): SheetEditInput

Allows a plugin to normalize or consume Sheet keyboard/text input.