preact-sample-sample-doc-link

PreviousNext
Docs
prosekitcomponent

Preview

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

export const sampleContent: NodeJSON = {
  type: 'doc',
  content: [
    {
      type: 'paragraph',
      content: [
        {
          type: 'text',
          text: 'Here is an ',
        },
        {
          type: 'text',
          marks: [
            {
              type: 'link',
              attrs: {
                href: 'https://www.example.com',
                target: null,
                rel: null,
              },
            },
          ],
          text: 'example link',
        },
      ],
    },
  ],
}

Installation

npx shadcn@latest add @prosekit/preact-sample-sample-doc-link

Usage

import { PreactSampleSampleDocLink } from "@/components/preact-sample-sample-doc-link"
<PreactSampleSampleDocLink />