react-sample-sample-doc-notion

PreviousNext
Docs
prosekitcomponent

Preview

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

export const sampleContent: NodeJSON = {
  type: 'doc',
  content: [
    {
      type: 'heading',
      attrs: { level: 1 },
      content: [{ type: 'text', text: 'A WIP Notion-like Editor' }],
    },
    {
      type: 'paragraph',
      content: [
        {
          type: 'text',
          text: 'Paragraph',
        },
      ],
    },
    {
      type: 'image',
    },
    {
      type: 'paragraph',
      content: [
        {
          type: 'text',
          text: 'Paragraph',
        },
      ],
    },
    {
      type: 'image',
      attrs: {
        src: 'https://static.photos/season/320x240/107',
      },
    },
    {
      type: 'paragraph',
      content: [
        {
          type: 'text',
          text: 'Paragraph',
        },
      ],
    },
  ],
}

Installation

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

Usage

import { ReactSampleSampleDocNotion } from "@/components/react-sample-sample-doc-notion"
<ReactSampleSampleDocNotion />