preact-sample-sample-doc-gap-cursor

PreviousNext
Docs
prosekitcomponent

Preview

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

export const sampleContent: NodeJSON = {
  type: 'doc',
  content: [
    {
      type: 'paragraph',
      content: [
        {
          type: 'text',
          text: 'Click the gap between two images or press arrow keys to see the gap cursor between two images',
        },
      ],
    },
    {
      type: 'image',
      attrs: {
        src: 'https://static.photos/minimal/320x180/42',
      },
    },
    {
      type: 'image',
      attrs: {
        src: 'https://static.photos/minimal/320x180/42',
      },
    },
  ],
}

Installation

npx shadcn@latest add @prosekit/preact-sample-sample-doc-gap-cursor

Usage

import { PreactSampleSampleDocGapCursor } from "@/components/preact-sample-sample-doc-gap-cursor"
<PreactSampleSampleDocGapCursor />