From zbeyens. The source code is available on GitHub.

Plate
PlatePliteEditorsTemplates
GitHub16kGitHub
DiscordDiscord
  • Plate
  • Plitev42
    • Editor API
    • Editor Transforms
    • Node
    • Element
    • Text
    • Path
    • Point
    • Range
    • Location
    • Location Ref
    • Document Change
  • Plate Core
    • Plate Components
    • Plate Editor
    • Plate Plugin
    • Plate Store
    • Plate Controller
  • Plate Utils
  • React Utils
  • cn
  • Floating
  • Resizable

Editor Transforms

PreviousNext

Transaction methods for changing Plite editor state.

Plite mutations live under editor.update. Use a direct group method for one write and the callback form for an atomic group of writes.

editor.update.text.insert("Hello");
 
editor.update((tx) => {
  tx.nodes.set({ type: "heading" });
  tx.text.insert("Title");
});
editor.update.text.insert("Hello");
 
editor.update((tx) => {
  tx.nodes.set({ type: "heading" });
  tx.text.insert("Title");
});

See the canonical Plite transform reference.

Editor APINode
Build your editor
Production-ready AI template and reusable components.
Get all-access