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.