solid-sample-sample-doc-hard-break

PreviousNext
Docs
prosekitcomponent

Preview

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

export const sampleContent: NodeJSON = {
  type: 'doc',
  content: [
    {
      type: 'paragraph',
      content: [
        {
          type: 'text',
          text: "O'er all the hilltops",
        },
        {
          type: 'hardBreak',
        },
        {
          type: 'text',
          text: 'Is quiet now,',
        },
        {
          type: 'hardBreak',
        },
        {
          type: 'text',
          text: 'In all the treetops',
        },
        {
          type: 'hardBreak',
        },
        {
          type: 'text',
          text: 'Hearest thou',
        },
        {
          type: 'hardBreak',
        },
        {
          type: 'text',
          text: 'Hardly a breath;',
        },
        {
          type: 'hardBreak',
        },
        {
          type: 'text',
          text: 'The birds are asleep in the trees:',
        },
        {
          type: 'hardBreak',
        },
        {
          type: 'text',
          text: 'Wait, soon like these',
        },
        {
          type: 'hardBreak',
        },
        {
          type: 'text',
          text: 'Thou too shalt rest.',
        },
        {
          type: 'hardBreak',
        },
      ],
    },
  ],
}

Installation

npx shadcn@latest add @prosekit/solid-sample-sample-doc-hard-break

Usage

import { SolidSampleSampleDocHardBreak } from "@/components/solid-sample-sample-doc-hard-break"
<SolidSampleSampleDocHardBreak />