HTML Editor
HTML-focused preset with visual editing plus JSON/HTML source tabs.
Internally this preset is a LegacyRichEditor wrapper with sourceFormat="html".
Usage
import { HTMLEditor } from '@lyfie/luthor';
import '@lyfie/luthor/styles.css';
export function App() {
return <HTMLEditor defaultEditorView="html" />;
}Props
HTMLEditorProps inherits LegacyRichEditorProps, then fixes source behavior to HTML.
initialMode:'visual' (default) | 'json' | 'html'defaultEditorView:'visual' (default) | 'json' | 'html'featureFlags:undefined (default) | FeatureFlagOverrides(preset-enforced exclusions still apply)
Behavior
Provides HTML-native formatting (headings, lists, links, quote, inline code, code block, horizontal rule), uses Visual/JSON/HTML tabs, keeps toolbar enabled, and disables metadata-heavy features by default.
Default modes
availableModes:["visual", "json", "html"]
Good fit
- CMS integrations that store sanitized HTML
- HTML-first publishing pipelines
- Apps with strict HTML output requirements