Skip to content

JSONB Persistence Quick Start (Replaces Legacy Enhanced Markdown Tutorial)

JSONB Persistence Quick Start (Replaces Legacy Enhanced Markdown Tutorial)

Section titled “JSONB Persistence Quick Start (Replaces Legacy Enhanced Markdown Tutorial)”

This path now uses Visual/JSONB-only workflows.

  • Use editor.getJSONB() to serialize state.
  • Use editor.injectJSONB(payload) to restore state.
  • Treat JSONB as canonical persistence format.
const handleSave = () => {
const payload = editorRef.current?.getJSONB();
if (!payload) return;
localStorage.setItem("editor-jsonb", payload);
};
const handleRestore = () => {
const payload = localStorage.getItem("editor-jsonb");
if (!payload) return;
editorRef.current?.injectJSONB(payload);
};

Legacy HTML/Markdown mode and enhanced-markdown converter guidance has been retired from active workflows. Use JSONB for deterministic round-trips and production persistence.