View as Markdown

API reference: @salmonui/rich-text

BlockEditorItemContextinterface

import type { BlockEditorItemContext } from '@salmonui/rich-text';
interface BlockEditorItemContext {
    readonly block: Block | null;
    readonly actions: BlockEditorActions;
}

What a custom menu entry receives.

BlockEditorItemContext members (2)
NameSignatureDescription
blockreadonly block: Block | null;

The block the menu belongs to (the caret's block for the slash menu and toolbar).

actionsreadonly actions: BlockEditorActions;