plitejs/react owns the React editor runtime: editor creation, the EditorRoot
provider, the Editable surface, browser event handling, native selection
sync, void shells, hidden DOM coverage, decorations, annotations,
and external text views. Explicit large-document virtualization lives
in plitejs/react/virtualized.
Start with useEditor, EditorRoot, and Editable.
import { EditorRoot, Editable, useEditor } from "plitejs/react";
const
import { EditorRoot, Editable, useEditor } from "plitejs/react";
const Editor = () => {
const editor = useEditor({
initialValue: [{ type: "paragraph", children: [{ text: "" }] }],
});
return (
<EditorRoot editor={editor}>
<Editable placeholder="Start typing..." />
</EditorRoot>
);
};EditorElement, EditorText, EditorLeaf, and
EditorPlaceholder carry Plite's DOM attributes when custom renderers need to
keep the native editing contract intact.plitejs/react/virtualized entrypoint.