react-sample-sample-doc-heading

PreviousNext
Docs
prosekitcomponent

Preview

Loading preview…
registry/src/react/sample/sample-doc-heading.ts
import type { NodeJSON } from 'prosekit/core'

export const sampleContent: NodeJSON = {
  type: 'doc',
  content: [
    { type: 'heading', attrs: { level: 1 }, content: [{ type: 'text', text: 'H1' }] },
    { type: 'heading', attrs: { level: 2 }, content: [{ type: 'text', text: 'H2' }] },
    { type: 'heading', attrs: { level: 3 }, content: [{ type: 'text', text: 'H3' }] },
    { type: 'paragraph', content: [] },
  ],
}

Installation

npx shadcn@latest add @prosekit/react-sample-sample-doc-heading

Usage

import { ReactSampleSampleDocHeading } from "@/components/react-sample-sample-doc-heading"
<ReactSampleSampleDocHeading />