@cosmocart/blog-editor
v0.1.0
Published
Lexical-based visual editor for cosmo-blog. Notion-style block editing with realtime autosave.
Readme
@cosmocart/blog-editor
Lexical-based visual editor for cosmo-blog. Web-first; the renderer (@cosmocart/blog-renderer) handles cross-platform / RNW.
import { BlogEditor } from '@cosmocart/blog-editor'
import '@cosmocart/blog-editor/styles.css'
<BlogEditor
initialDocument={post.blocks}
onChange={(doc, plainText) => save(doc)}
/>The editor's serialized state is the same JSON shape consumed by @cosmocart/blog-renderer — what you see in the editor is what you get on the published page.
