`@lyfie/luthor` Presets and Configuration
@lyfie/luthor Presets and Configuration
Section titled “@lyfie/luthor Presets and Configuration”This document describes what can be configured as a package user when using built-in presets.
Built-in preset registry
Section titled “Built-in preset registry”The package exports a preset registry and the extensive preset:
presetRegistryextensivePresetExtensiveEditorextensiveExtensions
Preset metadata model
Section titled “Preset metadata model”EditorPreset supports these fields:
id,label,descriptiontoolbar: ordered toolbar action idsextensions: extension set used by the presetconfig: editor config (namespace, placeholder, classNames)theme: preset theme objectcomponents: editor shell componentscss: style entry path
Extensive preset defaults
Section titled “Extensive preset defaults”The extensive preset is the full-feature default and includes:
- comprehensive toolbar actions
- command palette + slash command system
- media and embeds (image, iframe, YouTube)
- source mode switching and JSONB conversion helpers
ExtensiveEditor commonly used props
Section titled “ExtensiveEditor commonly used props”placeholderinitialThemedefaultContentshowDefaultContentinitialModeavailableModesclassNamevariantClassNameonReady
Source-mode behavior
Section titled “Source-mode behavior”Supported modes:
visualjsonb
When moving from source to visual mode, source content is validated and imported. Invalid source content blocks mode transition to prevent data loss.
Styling
Section titled “Styling”Include package styles:
import "@lyfie/luthor/styles.css";You can customize via wrapper classes and CSS variable overrides in your application stylesheet.
Advanced extension-level options
Section titled “Advanced extension-level options”The extensive preset internally configures options such as:
- font family option catalogs
- text/background color option catalogs
- image upload and alignment behavior
- embed defaults and URL handling
- JSONB persistence-friendly content workflows
For contributor-level details, see ../../developer/luthor/source-file-reference.md.