脸书开源了最新的文本编辑器 Lexical,目前脸书和 Instagram 官网用的都是它。它替代了脸书原来的 Draftjs,跟 Prosemirror 相比,更轻量、可配置性更高,缺点是文档目前不全。

    Lexical is comprised of editor instances that each attach to a single content editable element. A set of editor states represent the current and pending states of the editor at any given time.

    Lexical is designed for everyone. It follows best practices established in WCAG and is compatible with screen readers and other assistive technologies.

    Lexical is minimal. It doesn’t directly concern itself with UI components, toolbars or rich-text features and markdown. The logic for these features can be included via a plugin interface.