{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "callout-docs",
  "title": "Callout",
  "description": "Documentation for Callout",
  "files": [
    {
      "path": "../../content/docs/(plugins)/(elements)/callout.mdx",
      "content": "---\ntitle: Callout\ndocs:\n  - route: https://pro.platejs.org/docs/components/callout-node\n    title: Plus\n  - route: /docs/components/callout\n    title: Callout Element\n---\n\n<ComponentPreview name=\"callout-demo\" />\n\n<PackageInfo>\n\n## Features\n\n- Customizable callout blocks for highlighting important information\n- Support for different callout variants (e.g., info, warning, error)\n- Ability to set custom icons or emojis for callouts\n\n</PackageInfo>\n\n## Kit Usage\n\n<Steps>\n\n### Installation\n\nThe fastest way to add the callout plugin is with the `CalloutKit`, which includes pre-configured `CalloutPlugin` with the [Plate UI](/docs/installation/plate-ui) component.\n\n<ComponentSource name=\"callout-kit\" />\n\n- [`CalloutElement`](/docs/components/callout-node): Renders callout elements.\n\n### Add Kit\n\nAdd the kit to your plugins:\n\n```tsx\nimport { createPlateEditor } from 'platejs/react';\nimport { CalloutKit } from '@/components/editor/plugins/callout-kit';\n\nconst editor = createPlateEditor({\n  plugins: [\n    // ...otherPlugins,\n    ...CalloutKit,\n  ],\n});\n```\n\n</Steps>\n\n## Manual Usage\n\n<Steps>\n\n### Installation\n\n```bash\nnpm install @platejs/callout\n```\n\n### Add Plugin\n\nInclude `CalloutPlugin` in your Plate plugins array when creating the editor.\n\n```tsx\nimport { CalloutPlugin } from '@platejs/callout/react';\nimport { createPlateEditor } from 'platejs/react';\n\nconst editor = createPlateEditor({\n  plugins: [\n    // ...otherPlugins,\n    CalloutPlugin,\n  ],\n});\n```\n\n### Configure Plugin\n\nYou can configure the `CalloutPlugin` with a custom component to render callout elements.\n\n```tsx\nimport { CalloutPlugin } from '@platejs/callout/react';\nimport { createPlateEditor } from 'platejs/react';\nimport { CalloutElement } from '@/components/ui/callout-node';\n\nconst editor = createPlateEditor({\n  plugins: [\n    // ...otherPlugins,\n    CalloutPlugin.withComponent(CalloutElement),\n  ],\n});\n```\n\n- `withComponent`: Assigns [`CalloutElement`](/docs/components/callout-node) to render callout elements.\n\n</Steps>\n\n\n## Plate Plus\n\n<ComponentPreviewPro name=\"callout-pro\" />\n\n## Plugins\n\n### `CalloutPlugin`\n\nCallout element plugin.\n\n## Transforms\n\n### `tf.insert.callout`\n\nInsert a callout element into the editor.\n\n<API name=\"callout\">\n<APIOptions type=\"object\">\n  <APIItem name=\"variant\" type=\"string\" optional>\n    The variant of the callout to insert.\n  </APIItem>\n  <APIItem name=\"...InsertNodesOptions\" type=\"InsertNodesOptions<V>\">\n    Other options from `InsertNodesOptions`.\n  </APIItem>\n</APIOptions>\n</API>\n\n## Hooks\n\n### `useCalloutEmojiPicker`\n\nManage the emoji picker functionality for callouts.\n\n<API name=\"useCalloutEmojiPicker\">\n<APIOptions type=\"UseCalloutEmojiPickerOptions\">\n  <APIItem name=\"isOpen\" type=\"boolean\">\n    Whether the emoji picker is open.\n  </APIItem>\n  <APIItem name=\"setIsOpen\" type=\"(isOpen: boolean) => void\">\n    Function to set the open state of the emoji picker.\n  </APIItem>\n</APIOptions>\n\n<APIReturns type=\"object\">\n  <APIItem name=\"emojiToolbarDropdownProps\" type=\"object\">\n    Props for the emoji toolbar dropdown.\n    <APISubList>\n      <APISubListItem parent=\"emojiToolbarDropdownProps\" name=\"isOpen\" type=\"boolean\">\n        Whether the emoji picker is open.\n      </APISubListItem>\n      <APISubListItem parent=\"emojiToolbarDropdownProps\" name=\"setIsOpen\" type=\"(v: boolean) => void\">\n        Function to set the open state of the emoji picker, respecting read-only mode.\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n  <APIItem name=\"props\" type=\"object\">\n    Props for the emoji picker component.\n    <APISubList>\n      <APISubListItem parent=\"props\" name=\"isOpen\" type=\"boolean\">\n        Whether the emoji picker is open.\n      </APISubListItem>\n      <APISubListItem parent=\"props\" name=\"setIsOpen\" type=\"(isOpen: boolean) => void\">\n        Function to set the open state of the emoji picker.\n      </APISubListItem>\n      <APISubListItem parent=\"props\" name=\"onSelectEmoji\" type=\"(options: { emojiValue?: any; icon?: any }) => void\">\n        Function called when an emoji is selected. It updates the callout's icon and closes the picker.\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n</APIReturns>\n</API>\n\n## Types\n\n### `TCalloutElement`\n\n```typescript\ninterface TCalloutElement extends TElement {\n  variant?: string;\n  icon?: string;\n}\n```\n\n<API name=\"TCalloutElement\">\n<APIAttributes>\n  <APIItem name=\"variant\" type=\"string\" optional>\n    The variant of the callout.\n  </APIItem>\n  <APIItem name=\"icon\" type=\"string\" optional>\n    The icon or emoji to display.\n  </APIItem>\n</APIAttributes>\n</API>\n",
      "type": "registry:file",
      "target": "content/docs/plate/(plugins)/(elements)/callout.mdx"
    }
  ],
  "type": "registry:file"
}