Skip to content

editorCommands

editorCommands(hotkeyMap, selfClosePairs, selfCloseRegex): BasicExtension

Defined in: extensions/commands/index.ts:32

Extension that will add automatic closing of brackets, quotes, and tags along with the specified commands.

Record<string, EditorHotkey>

Commands that will be added to the editor.

string[] = ...

Pairs of self-closing brackets and quotes. Must be an array of strings with 2 characters each. Defaults to ['""', "''", '``', '()', '[]', '{}'].

RegExp = ...

Regex controlling whether or not a bracket/quote should automatically close based on the character before and after the cursor. Defaults to /([^$\w'"`]["'`]|.[[({])[.,:;\])}>\s]|.[[({]`/s.

BasicExtension