Skip to content

Slash Commands

Slash commands provide a quick-insert menu that appears when you type / at the start of a line.

Enabling Slash Commands

Slash commands are enabled by default. To explicitly control them:

vue
<template>
  <Tiptapify
    :slash-commands="true"
    placeholder="Type / to see available commands..."
  />
</template>

Available Commands

Type / in the editor to see the command palette. Available commands include:

CommandDescription
/h1 - /h6Insert a heading (levels 1-6)
/bulletListInsert a bullet list
/numberedListInsert a numbered list
/taskListInsert a task list
/codeInsert inline code
/codeBlockInsert a code block
/quoteInsert a blockquote
/imageInsert an image (opens URL dialog)
/videoEmbed a YouTube video
/tableInsert a table
/linkInsert a hyperlink
/dividerInsert a horizontal rule
/emojiOpen emoji picker
/specialCharsOpen special characters

How It Works

  1. Place your cursor at the beginning of a line or after a space
  2. Type / — the command palette appears
  3. Continue typing to filter commands
  4. Press Enter or click to insert the selected command

Disabling Slash Commands

vue
<template>
  <Tiptapify
    :slash-commands="false"
    placeholder="Slash commands disabled..."
  />
</template>

Slash Commands with Floating Menu

Combine slash commands with the floating menu for the best editing experience:

vue
<template>
  <Tiptapify
    :slash-commands="true"
    :floating-menu="true"
    :bubble-menu="true"
    placeholder="Full command experience..."
  />
</template>
  • Slash commands (/) — triggered by typing / at the start of a line
  • Floating menu — appears when you place your cursor on an empty line (offers block-level actions)
  • Bubble menu — appears when you select text (offers inline formatting)

Filtering Available Commands

You can specify which commands to include by passing an array of command IDs:

vue
<template>
  <Tiptapify
    :slash-commands="['h1', 'h2', 'h3', 'bulletList', 'numberedList', 'quote']"
    placeholder="Filtered commands..."
  />
</template>

Available Command IDs

IDDescription
h1 - h6Heading levels 1-6
bulletListBullet list
numberedListNumbered list
taskListTask list
codeInline code
codeBlockCode block
quoteBlockquote
imageImage
videoYouTube video
tableTable
linkLink
dividerHorizontal rule
emojiEmoji
specialCharsSpecial characters

Released under the MIT License.