Features
Libraries
Every document feature behind one import, from the standard kit to callout, toggle, link, image, table, code block, Mermaid, math, mention and embed.
Installation#
bash
pnpm dlx shadcn@latest add @zui/editor-featuresUsage#
tsx
import type { DocJSON } from '@zeroxsolutions/editor-core/document/core/index';
import { callout, standardKit, toggle } from '@/components/editor/document/features';
import { Editor } from '@/components/editor/document/react';tsx
const features = [standardKit(), callout(), toggle()];
function NotesEditor({ content }: { content: DocJSON }) {
return <Editor features={features} content={content} />;
}The barrel exports standardKit, callout, toggle, link, image, table, codeBlock, mermaid, math, mention and embed, each the one function its own page shows. Installing it installs every feature, with KaTeX and Mermaid behind two of them; to keep a project to the blocks it draws, install the feature items one by one and import each from its own folder.