@tbtop/plugin-lexical
v0.11.0
Published
Tabletop plugin: Lexical rich-text editor field for the admin builder.
Downloads
80
Readme
@tbtop/plugin-lexical
Lexical rich-text editor field for @tbtop/admin. Ships an editor component for forms and a renderer for read-only display.
Install
npm install @tbtop/plugin-lexical @tbtop/admin react react-dom@tbtop/admin, react, react-dom are peer dependencies.
Usage
Register the admin plugin and import its styles:
import { lexicalAdminPlugin } from "@tbtop/plugin-lexical";
import "@tbtop/plugin-lexical/styles.css";
const config = defineAdminConfig({
plugins: [lexicalAdminPlugin()],
});Read-only rendering on the public site:
import { LexicalRenderer } from "@tbtop/plugin-lexical/renderer";
<LexicalRenderer content={post.body} />License
MIT
