View as Markdown

API reference: @salmonui/rich-text

RichTextExtensionContextinterface

import type { RichTextExtensionContext } from '@salmonui/rich-text';
interface RichTextExtensionContext {
    readonly schema: Schema;
    getState(): EditorState;
    getView(): EditorView | null;
}

What an extension's plugin factory receives.

RichTextExtensionContext members (3)
NameSignatureDescription
schemareadonly schema: Schema;
getStategetState(): EditorState;

The engine's current state (after mount the view's state).

getViewgetView(): EditorView | null;

The view once mounted.