@searsuite/sear-plugin-sheet-doc-adapter
The default Doc-backed rich-text editor adapter for Sheet cells.
Embedded document editor
- classSearCoreEditorAdapter
-
class SearCoreEditorAdapter extends SheetEmbeddedEditorSheet adapter that owns one lightweight SearCoreDoc for all embedded cells.
constructor SearCoreEditorAdapter(options?: SearCoreEditorAdapterOptions): SearCoreEditorAdapterproperty readonly formatting: { apply: (document: readonly Schema[], format: Readonly<Record<string, unknown>>): Schema[]; capture: (document: readonly Schema[]): Readonly<Record<string, unknown>> }Pure formatting projection; applying it returns a new snapshot without changing editor state.
property readonly observations: ObservationRegistryTyped editor-local state and event observations exposed to the host.
method bindTeardownToken(token: object): voidRestricts runtime teardown to the owning Sheet editor when supported.
method createEditSession(context: SheetEmbeddedEditorContext): SheetEditSessionmethod createRenderSession(context: SheetEmbeddedEditorContext): SheetRenderSessionmethod dispose(ownerToken?: object): voidmethod initialize(context: SheetEmbeddedEditorContext): void - classSheetEmbeddedEditorPluginRegistry
-
Ordered registry used by the lightweight Sheet embedded editor.
constructor SheetEmbeddedEditorPluginRegistry(): SheetEmbeddedEditorPluginRegistrymethod dispose(ownerToken?: object): voidmethod enforceWriteBoundary(assertWrite: (): void, teardownToken: object): voidRestricts plugin changes after the embedded editor joins a Sheet command bus.
method get(key: string): SheetEmbeddedEditorPlugin | undefinedmethod getAll(): readonly SheetEmbeddedEditorPlugin[]method initialize(context: SheetEmbeddedEditorPluginContext): voidmethod notifyCancel(context: SheetEmbeddedEditorPluginContext): voidmethod notifyCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): voidmethod notifyRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidmethod register(plugin: SheetEmbeddedEditorPlugin): voidmethod transformCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): SheetDocument | nullmethod transformInlineStyle(update: SheetInlineStyleUpdate, context: SheetEmbeddedEditorPluginContext): SheetInlineStyleUpdate | nullmethod transformInput(input: SheetEditInput, context: SheetEmbeddedEditorPluginContext): SheetEditInput | nullmethod unregister(key: string): void - interfaceEmbeddedDocConfig
-
Configuration for the Doc instance embedded inside a Sheet cell.
property readonly fontFamily: stringDefault font family and fallback list used by the active embedded document editor.
property readonly fontSize: numberDefault font size used by the active embedded document editor.
property readonly padding: numberPadding between the cell edge and embedded document text.
- interfaceSearCoreEditorAdapterOptions
-
Configuration for the Sheet-specific SearCore document adapter.
property readonly embeddedDocConfig?: Partial<EmbeddedDocConfig>Configuration scoped to the Doc embedded inside a Sheet cell.
property readonly 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.
property readonly key: stringStable identity used to reject duplicate registrations.
method dispose(): voidCalled before the adapter releases this plugin.
method initialize(context: SheetEmbeddedEditorPluginContext): voidCalled once when the adapter is initialized.
method onCancel(context: SheetEmbeddedEditorPluginContext): voidCalled after an edit is cancelled.
method onCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): voidCalled after Sheet has committed the edited document.
method onRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidCalled after a render pass has completed.
method transformCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): void | SheetDocument | nullAllows a Sheet plugin to normalize the snapshot at the commit boundary.
method transformInlineStyle(update: SheetInlineStyleUpdate, context: SheetEmbeddedEditorPluginContext): void | SheetInlineStyleUpdate | nullAllows a plugin to normalize an inline style update before Doc input runs.
method transformInput(input: SheetEditInput, context: SheetEmbeddedEditorPluginContext): void | SheetEditInput | nullAllows 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: EmbeddedDocConfigBuilt-in defaults for a Doc instance embedded inside a Sheet cell.
- functioncreateSheetEmbeddedSearCoreEditor
-
createSheetEmbeddedSearCoreEditor(options?: SearCoreEditorAdapterOptions): SearCoreEditorAdapterCreates the lightweight SearCore editor used by Sheet embedded cells.
- functionregisterSheetEmbeddedInlineStyleObservation
-
registerSheetEmbeddedInlineStyleObservation(observations: ObservationRegistry, input: DocInputPlugin, inlineStyles: RichTextInlineStyleRegistry, isEditing: (): boolean, readTypingStyle?: (): Readonly<Record<string, unknown>>): SheetEmbeddedInlineStyleObservationControllerRegisters the selection-derived inline-style state with an embedded editor.
Sheet integration plugins
- classSheetCellContextPlugin
-
class SheetCellContextPlugin extends SheetEmbeddedEditorPluginAdapts Sheet cell geometry and pointer coordinates for embedded sessions.
constructor SheetCellContextPlugin(): SheetCellContextPluginproperty readonly key: "sheet.cell-context"Stable identity used to reject duplicate registrations.
method initialize(context: SheetEmbeddedEditorPluginContext): voidCalled once when the adapter is initialized.
method toLocalPoint(context: SheetEmbeddedEditorContext, point: SheetEditorPoint): SheetEditorPointmethod toSheetPoint(context: SheetEmbeddedEditorContext, point: SheetEditorPoint): SheetEditorPoint - classSheetClipboardPlugin
-
class SheetClipboardPlugin extends SheetEmbeddedEditorPluginSheet clipboard codec for the shared rich-document snapshot protocol.
constructor SheetClipboardPlugin(): SheetClipboardPluginproperty readonly key: "sheet.clipboard"Stable identity used to reject duplicate registrations.
method deserialize(value: string): SheetDocumentmethod serialize(document: SheetDocument): string - classSheetDocIntegrationPlugin
-
class SheetDocIntegrationPlugin extends SheetEmbeddedEditorPluginExtension point for Sheet-to-Doc integration policies.
constructor SheetDocIntegrationPlugin(): SheetDocIntegrationPluginproperty readonly key: "sheet.doc-integration"Stable identity used to reject duplicate registrations.
- classSheetFormulaReferencePlugin
-
class SheetFormulaReferencePlugin extends SheetEmbeddedEditorPluginFinds formula-like references for Sheet overlays without changing document data.
constructor SheetFormulaReferencePlugin(): SheetFormulaReferencePluginproperty readonly key: "sheet.formula-reference"Stable identity used to reject duplicate registrations.
method dispose(): voidCalled before the adapter releases this plugin.
method getReferences(): readonly string[]method initialize(context: SheetEmbeddedEditorPluginContext): voidCalled once when the adapter is initialized.
method onRender(_update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidCalled after a render pass has completed.
- classSheetOverflowPlugin
-
class SheetOverflowPlugin extends SheetEmbeddedEditorPluginKeeps overflow sizing as a Sheet concern and requests geometry redraws.
constructor SheetOverflowPlugin(): SheetOverflowPluginproperty readonly key: "sheet.overflow"Stable identity used to reject duplicate registrations.
method dispose(): voidCalled before the adapter releases this plugin.
method getContentSize(): { height: number; width: number } | nullmethod onCommit(_document: SheetDocument, _context: SheetEmbeddedEditorPluginContext): voidCalled after Sheet has committed the edited document.
method onRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidCalled after a render pass has completed.
- classSheetShortcutPlugin
-
class SheetShortcutPlugin extends SheetEmbeddedEditorPluginOptional key mapping hook for Sheet hosts that add cell-navigation shortcuts.
constructor SheetShortcutPlugin(shortcuts?: Readonly<Record<string, SheetEditInput>>): SheetShortcutPluginproperty readonly key: "sheet.shortcuts"Stable identity used to reject duplicate registrations.
method transformInput(input: SheetEditInput, _context: SheetEmbeddedEditorPluginContext): SheetEditInputAllows a plugin to normalize or consume Sheet keyboard/text input.
No matching API entries.