Facebook announced that it open-sourced Lexical, an extensible JavaScript web text-editor library that emphasizes reliability, accessibility and performance.
The project’s set of editor states represent the current and pending states of the editor at any given time. Developers can attach a content-editable DOM element to editor instances, and also register listeners and commands. Users can create an editor instance with the createEditor() API.
Lexical’s states contain two parts: a Lexical node tree and a Lexical selection object which are immutable once created.
Lexical has its own DOM reconciler that takes a set of Editor States (always the “current” and the “pending”) and applies a “diff” on them. It then uses this diff to update only the parts of the DOM that need changing.
Lexical is compatible with screen readers and other assistive technologies and it is framework agnostic and provides a set of bindings for React to simplify building custom functionality.
Additional details on Lexical are available here.
The post SD Times Open-Source Project of the Week: Lexical appeared first on SD Times.
from SD Times https://ift.tt/pZWNRQj
Comments
Post a Comment