web-editor-lexical
Installation
SKILL.md
Lexical Editor Patterns
Quick Guide: Lexical is an editor framework rather than an editor: the core gives you a node tree, a selection model, a reconciler, a command bus and an update lifecycle, and everything else is a plugin. EditorState is immutable, so every read and every mutation happens inside an
editor.update()oreditor.read()closure, and the$-prefixed functions are the ones that require that context. Extend the tree throughElementNode,TextNodeorDecoratorNode, and react to content through transforms rather than listeners. Current: v0.42.x, pre-1.0 — APIs still move between minors.
Detailed Resources:
- examples/core.md — editor setup, plugins with cleanup, toolbars, transforms, persistence
- examples/custom-nodes.md — ElementNode, TextNode and DecoratorNode classes, the NodeState and
$configAPIs - examples/serialization.md — JSON and HTML round trips,
exportDOM/importDOM, headless editors - reference.md — package map, command priorities, built-in commands, node hierarchy, plugin list, custom-node checklist