### Install @tiptap/extension-starter-kit via npm Source: https://github.com/niazmorshed2007/shadcn-tiptap/blob/main/src/content/docs/extensions/starter-kit.mdx Manually installs the starter kit extension for Tiptap using npm. This command is part of the manual setup process and requires additional steps for toolbar integration. ```bash npm install @tiptap/extension-starter-kit ``` -------------------------------- ### Install shadcn-tiptap Starter Kit via CLI Source: https://github.com/niazmorshed2007/shadcn-tiptap/blob/main/src/content/docs/extensions/starter-kit.mdx Installs the shadcn-tiptap starter kit and its associated toolbar components using a single npx command. This is the recommended and quickest method for integrating the starter kit. ```bash npx shadcn add https://tiptap.niazmorshed.dev/r/starter-kit.json ``` -------------------------------- ### Install shadcn-tiptap via CLI Source: https://github.com/niazmorshed2007/shadcn-tiptap/blob/main/src/content/docs/toolbars/color-and-highlight.mdx Use the npx command to add the shadcn-tiptap configuration directly to your project. This is the quickest way to get started. ```bash npx shadcn add https://tiptap.niazmorshed.dev/r/color-and-highlight-toolbar.json ``` -------------------------------- ### Install shadcn-tiptap Image Placeholder via CLI Source: https://github.com/niazmorshed2007/shadcn-tiptap/blob/main/src/content/docs/extensions/image-placeholder.mdx Use the provided npx command to directly install the image placeholder extension and its associated toolbar component into your project. This is the quickest method for integrating the functionality. ```bash npx shadcn add https://tiptap.niazmorshed.dev/r/image-placeholder.json ``` -------------------------------- ### Add ToolbarProvider using shadcn CLI Source: https://github.com/niazmorshed2007/shadcn-tiptap/blob/main/src/content/docs/installation.mdx Installs the ToolbarProvider component using the shadcn CLI. This command fetches the component configuration from a remote URL and integrates it into your project. Ensure you have the shadcn CLI installed and configured. ```bash npx shadcn add https://tiptap.niazmorshed.dev/r/toolbar-provider.json ``` -------------------------------- ### Install Core Tiptap Packages with npm Source: https://github.com/niazmorshed2007/shadcn-tiptap/blob/main/src/content/docs/installation.mdx Installs the fundamental Tiptap packages required for editor functionality. These include the core library, React integration, and the ProseMirror core. No specific inputs are needed beyond running the command in a project with npm. ```bash npm install @tiptap/react @tiptap/core @tiptap/pm ``` -------------------------------- ### Tiptap Editor Extensions Configuration with HTML Attributes Source: https://github.com/niazmorshed2007/shadcn-tiptap/blob/main/src/content/docs/extensions/starter-kit.mdx Configures Tiptap editor extensions, specifically StarterKit, to include custom HTML attributes for various elements like ordered lists, bullet lists, code, code blocks, and headings. This allows for custom styling via CSS classes. The example also shows basic editor initialization with content. ```javascript const extensions = [ StarterKit.configure({ orderedList: { HTMLAttributes: { class: "list-decimal", }, }, bulletList: { HTMLAttributes: { class: "list-disc", }, }, code: { HTMLAttributes: { class: "bg-accent rounded-md p-1", }, }, horizontalRule: { HTMLAttributes: { class: "my-2", }, }, codeBlock: { HTMLAttributes: { class: "bg-primary text-primary-foreground p-2 text-sm rounded-md p-1", }, }, heading: { levels: [1, 2, 3, 4], HTMLAttributes: { class: "tiptap-heading", }, }, }), // ...rest of the extensions ]; const editor = useEditor({ extensions, content: "