Slash Editor
SlashEditor is a slash-first preset tuned for command-driven writing.
Usage
import { SlashEditor } from '@lyfie/luthor';
import '@lyfie/luthor/styles.css';
export function App() {
return <SlashEditor showDefaultContent={false} />;
}Props
SlashEditorProps inherits ExtensiveEditorProps except featureFlags and isToolbarEnabled, then re-adds both.
slashVisibility:undefined (default) | SlashCommandVisibilityisDraggableEnabled:true (default) | falsefeatureFlags:undefined (default) | FeatureFlagOverridesisToolbarEnabled:false (default) | true
Behavior
Defaults keep toolbar hidden, enable draggable blocks, and provide a curated slash-command allowlist for fast block creation.
Default modes
availableModes:["visual", "json", "markdown", "html"]
Default slash allowlist
format.bold,format.italic,format.underline,format.strikethrough,format.codeblock.paragraph,block.heading1toblock.heading6,block.quote,block.codeblocklist.bullet,list.numbered,list.checklink.insert,insert.horizontal-rule,insert.table
Feature policy notes
- Enforced:
slashCommand: true,commandPalette: false - Default:
isToolbarEnabled = false - Override available through props if your product needs a visible toolbar