BlockSuite API Documentation / @blocksuite/block-std / CommandExtension
Function: CommandExtension()
CommandExtension(
commands
):ExtensionType
Create a command extension.
Parameters
• commands: Partial
<Commands
>
A map of command names to command implementations.
Returns
Example
ts
import { CommandExtension } from '@blocksuite/block-std';
const MyCommandExtension = CommandExtension({
'my-command': MyCommand
});
Defined in
packages/framework/block-std/src/extension/command.ts:20