Skip to main content

createCommand

function

Crete a command that can be used with `editor.dispatchCommand` and `editor.registerCommand`. Commands are used by unique reference, not by name.

function createCommand<T>(type?: string): LexicalCommand<T>

Import

import { createCommand } from '@modular/sdk/editor';

Notes

returns
A new LexicalCommand
__NO_SIDE_EFFECTS__