@platejs/plite-react owns the React editor runtime: editor creation, the Plite
provider, the Editable surface, browser event handling, native selection
sync, void shells, hidden DOM coverage, decoration sources, annotations,
widgets, and large-document DOM strategies.
Start with usePliteEditor, Plite, and Editable.
import { Plite, Editable, usePliteEditor } from "@platejs/plite-react";
const Editor = () => {
const editor = usePliteEditor
import { Plite, Editable, usePliteEditor } from "@platejs/plite-react";
const Editor = () => {
const editor = usePliteEditor({
initialValue: [{ type: "paragraph", children: [{ text: "" }] }],
});
return (
<Plite editor={editor}>
<Editable placeholder="Start typing..." />
</Plite>
);
};PliteElement, PliteText, PliteLeaf, and
PlitePlaceholder carry Plite's DOM attributes when custom renderers need to
keep the native editing contract intact.usePliteNodeRef, useDOMStrategyVirtualOffset, and
usePliteRangeDecorationSource.