Overview

PreviousNext

Plite editor runtime docs for the Plate-maintained package set.

Plite is a JSON editor runtime for building product-specific rich text editors. This docs section covers the Plite packages, their React renderer, their browser proof harness, and the boundaries that keep the runtime verifiable. Start here when you want the current package shape, not upstream Slate 0.x compatibility notes.

On This Page

Install

Install the React editor path first:

pnpm add @platejs/plite @platejs/plite-dom @platejs/plite-react react react-dom
pnpm add @platejs/plite @platejs/plite-dom @platejs/plite-react react react-dom

Add optional packages only when the editor imports them:

pnpm add @platejs/plite-history @platejs/plite-hyperscript @platejs/yjs @platejs/plite-layout
pnpm add @platejs/plite-history @platejs/plite-hyperscript @platejs/yjs @platejs/plite-layout

@platejs/browser is the browser proof package. Use it in tests and proof harnesses, not as the product editing API.

Core Shape

Plite gives you a document model, an explicit runtime, and React rendering hooks.

LayerWhat it owns
Document modelnested JSON nodes, paths, points, ranges, operations, primary children, extra roots, and document state
Runtimeeditor.read.<group>.<method>(), editor.update.<group>.<method>(), grouped read/update callbacks, transactions, commits, normalization, refs, history integration, and extension groups
React<Plite>, <Editable>, render functions, editor hooks, DOM repair, selection sync, overlays, and root-aware chrome
Proofbrowser tests that check model state, rendered DOM, native selection where observable, focus, replay, and follow-up typing

The first editor usually looks like this:

import { Editable, Plite, usePliteEditor } from "@platejs/plite-react";
 
const initialValue = [
  {
    type: "paragraph",
    children: [{ text: "A line of text." }],
  },
];
 
export function Editor() {
  const editor = usePliteEditor({ initialValue });
 
  return (
    <Plite editor={editor}>
      <Editable placeholder="Start typing..." />
    </Plite>
  );
}
import { Editable, Plite, usePliteEditor } from "@platejs/plite-react";
 
const initialValue = [
  {
    type: "paragraph",
    children: [{ text: "A line of text." }],
  },
];
 
export function Editor() {
  const editor = usePliteEditor({ initialValue });
 
  return (
    <Plite editor={editor}>
      <Editable placeholder="Start typing..." />
    </Plite>
  );
}

One-shot reads stay explicit:

const value = editor.read.value();
const value = editor.read.value();

One-shot writes stay explicit:

editor.update.text.insert("Hello");
editor.update.text.insert("Hello");

Use editor.read((state) => ...) and editor.update((tx) => ...) when a command needs grouped reads, grouped writes, extension namespaces, update tags, or post-commit hooks.

Pick A First Path

If you want to...Start with
Render one editor in ReactInstalling Plite
Understand the modelNodes, then Locations
Port commandsExecuting Commands, then Commands
Store editor valuesSaving to a Database and Document Meta
Add schema or custom transactionsExtensions
Understand editing behaviorEditing Behavior, then Selection And DOM
Handle paste, copy, drop, or fragmentsClipboard And Paste
Build comments, highlights, or overlaysProjection And Overlays
Test browser editing behaviorBrowser
Move from upstream Slate 0.xMigration

Examples

The examples run inside this docs app:

Use examples for behavior shape. Use the docs pages for the API contract.

Package Map

PackageRead when
@platejs/pliteYou need the editor runtime, document model, helper APIs, transactions, extensions, or state fields.
@platejs/plite-domYou need DOM conversion, clipboard helpers, hotkeys, or browser environment helpers.
@platejs/plite-reactYou render editors with React, use <Editable>, read editor state in components, or build overlays.
@platejs/plite-historyYou need undo/redo and history state.
@platejs/plite-hyperscriptYou write JSX editor fixtures for tests.
@platejs/yjsYou connect a Plite editor to Yjs document meta and awareness.
@platejs/plite-layoutYou build page-layout proof surfaces or paged editor experiments.
@platejs/browserYou write browser-level editor proof.

Proof Boundary

This package set is unpublished beta documentation. Treat the runtime as current, but do not treat every adjacent editor problem as solved.

AreaClaim
Desktop editor behaviorClaimed when package tests and browser proof cover the behavior.
Raw mobile device behaviorDeferred until real device proof exists.
PaginationKept in @platejs/plite-layout and example lanes; not the core editor promise.
Collaboration@platejs/yjs owns Plite/Yjs mapping. Apps own providers, auth, persistence, and rooms.
Upstream identityThis is Plite package set, not an official upstream Slate release.

Read Why This Fork for the maintenance philosophy and hard boundaries.