DemoDocsPlaygroundGitHub

An extensible rich text editor framework built on Lexical. Ship faster with production-ready defaults and TypeScript-first APIs.

Documentation

IntroductionInstallation@lyfie/luthor-headless@lyfie/luthor

Resources

DemoFeaturesPlaygroundGitHubluthor @ npmluthor-headless @ npm

Support the Project

Buy me a coffeeStar on GitHub

Built with ❤️ by Lyfie.org

HomeDocsFeaturesDemodev.toMediumGitHubllms.txtllms-full.txt
  1. Home
  2. Docs
  3. Luthor
  4. Commands Reference

Luthor Documentation

Start Here

  • Getting Started
  • Installation
  • Dependencies
  • Capabilities
  • Quickstart: @lyfie/luthor
  • Quickstart: @lyfie/luthor-headless
  • AI Agents and Vibe Coding

@lyfie/luthor (Presets)

  • @lyfie/luthor Overview
  • @lyfie/luthor Architecture
  • Feature Flags
  • Props Reference
  • Presets Catalog
  • Extensive Editor
  • Legacy Rich Editor
  • Markdown Editor
  • HTML Editor
  • Papyra Editor
  • Commands Reference

@lyfie/luthor-headless (Runtime)

  • @lyfie/luthor-headless Overview
  • @lyfie/luthor-headless Architecture
  • Extensions and API
  • Metadata Comment System
  • Features
  • Typography and Text
  • Structure and Lists
  • Media and Embeds
  • Code and Devtools
  • Interaction and Productivity
  • Customization and Theming
  • Extensions Reference
  • Nodes and Bridges Reference

Integrations

  • React Integration
  • Next.js Integration
  • Astro Integration
  • Remix Integration
  • Vite Integration

Reference Indexes

  • Search Guide
  • Exports Map
  • Preset Selector

Contributing

  • Contributor Guide

Package: luthorType: referenceSurface: command

Commands Reference

This is the canonical command ID reference for preset command workflows.

What this page answers

  • Which command IDs are public?
  • Which IDs are generated from heading options?

Public command IDs

  • block.align-center
  • block.align-justify
  • block.align-left
  • block.align-right
  • block.code-language
  • block.code-language.auto
  • block.codeblock
  • block.heading1
  • block.heading2
  • block.heading3
  • block.heading4
  • block.heading5
  • block.heading6
  • block.paragraph
  • block.quote
  • edit.redo
  • edit.undo
  • format.bold
  • format.code
  • format.italic
  • format.strikethrough
  • format.subscript
  • format.superscript
  • format.underline
  • insert.emoji
  • insert.gif
  • insert.horizontal-rule
  • insert.iframe
  • insert.image
  • insert.table
  • insert.youtube
  • link.insert
  • link.remove
  • list.bullet
  • list.check
  • list.numbered
  • palette.show

Host-contributed slash commands

The IDs above are the editor's built-in catalogue, filtered into the slash menu by slashCommandVisibility. To add commands the catalogue does not cover — for example "Link note" or "Insert date" — pass extraSlashCommands to <ExtensiveEditor>. These are appended after the built-ins (so they are not subject to slashCommandVisibility, which only filters the built-ins) and also appear in the command palette.

Each command's action receives an ExtensiveSlashCommandContext. The slash trigger (/query) is removed and the caret restored before action runs, so insertText lands exactly where the slash was typed. The action may be async (e.g. to await an upload before inserting a reference).

tsx
<ExtensiveEditor
  extraSlashCommands={[
    {
      id: "app.insert-date",
      label: "Insert date",
      description: "Insert today's date",
      category: "Insert",
      keywords: ["date", "today"],
      action: ({ insertText }) => insertText(new Date().toISOString().slice(0, 10)),
    },
  ]}
/>

Memoize the array so the slash menu is not re-registered on every render.

The papyra preset uses this seam internally to contribute its note-taking commands — "Link note" (drops the [[ wikilink trigger), "Embed media" (uploads through the adapter, inserts ![[name]]), and "Insert date".

Previous: Papyra Editor
Next: @lyfie/luthor-headless Overview

On this page

  • What this page answers
  • Public command IDs
  • Host-contributed slash commands