Typix LogoTypix
Extensions

Short Cuts

Keyboard shortcuts for editor formatting and block operations

The Short Cuts extension registers keyboard shortcuts for common formatting, block, alignment, and font size operations.

Demo

Loading preview...
import {  EditorContent,  EditorRoot,  createEditorConfig,  defaultExtensionNodes,} from "@typix-editor/react";import { ShortCutsExtension } from "@typix-editor/extension-short-cuts";import { theme } from "./theme";import "./style.css";const config = createEditorConfig({  extensionNodes: defaultExtensionNodes,  theme,});export default function ShortCutsExample() {  return (    <EditorRoot config={config}>      <EditorContent placeholder="Try keyboard shortcuts..." />      <ShortCutsExtension />    </EditorRoot>  );}

Installation

pnpm add @typix-editor/extension-short-cuts
npm install @typix-editor/extension-short-cuts
yarn add @typix-editor/extension-short-cuts

Setup

import { ShortCutsExtension } from '@typix-editor/extension-short-cuts';

function MyEditor() {
  return (
    <EditorRoot>
      <EditorContent />
      <ShortCutsExtension />
    </EditorRoot>
  );
}

Props

PropTypeDefaultDescription
onLinkEditModeChange(isLinkEditMode: boolean) => voidCallback when link edit mode toggles

Available shortcuts

Block formatting

ShortcutAction
Ctrl+Alt+0Paragraph
Ctrl+Alt+16Heading 1–6
Ctrl+Alt+7Bullet list
Ctrl+Alt+8Numbered list
Ctrl+Alt+9Check list
Ctrl+Shift+CCode block
Ctrl+Shift+QBlock quote

Text formatting

ShortcutAction
Ctrl+Shift+SStrikethrough
Ctrl+Shift+LLowercase
Ctrl+Shift+UUppercase
Ctrl+Shift+KCapitalize
Ctrl+,Subscript
Ctrl+.Superscript
Ctrl+Shift+EInline code

Alignment

ShortcutAction
Ctrl+Shift+LLeft align
Ctrl+Shift+ECenter align
Ctrl+Shift+RRight align
Ctrl+Shift+JJustify

Other

ShortcutAction
Ctrl+Shift+=Increase font size
Ctrl+Shift+-Decrease font size
Ctrl+Shift+XClear formatting
Ctrl+KInsert/toggle link
Ctrl+]Indent
Ctrl+[Outdent

On macOS, Ctrl is replaced with Cmd.

Exports

ExportTypeDescription
ShortCutsExtensionComponentThe keyboard shortcuts plugin
ShortCutsExtensionPropsTypeProps type
SHORTCUTSObjectShortcut definitions for reference

On this page