tabSpacesAtCurosrInCodeBlockCommand function

CommandShortcutEvent tabSpacesAtCurosrInCodeBlockCommand(
  1. String description
)

Tab to insert two spaces at the cursor if selection is collapsed.

  • support
    • desktop
    • web

Implementation

CommandShortcutEvent tabSpacesAtCurosrInCodeBlockCommand(String description) =>
    CommandShortcutEvent(
      key: 'tab to insert two spaces at the cursor in code block',
      command: 'tab',
      getDescription: () => description,
      handler: (editorState) =>
          _addTwoSpacesInCodeBlockCommandHandler(editorState),
    );