Next.js
Install the editor
Start in an empty directory.
pnpm dlx @tiptap/cli@latest init simple-editorChoose Next.js and enter a project name. From an existing Next.js App Router project, install the template from the directory that contains package.json.
pnpm dlx @tiptap/cli@latest add simple-editorIn an existing pnpm 11 project, the Sass install can stop with ERR_PNPM_IGNORED_BUILDS. Skip the watcher build
Start the development server in the project directory with pnpm dev and open /simple. The CLI creates app/simple/page.tsx, or src/app/simple/page.tsx in a project with a src directory. Your home page stays at /.
Render the editor
The generated page renders SimpleEditor inside Suspense, so the production build works when the project enables Cache Components. Keep the boundary when you render the editor on another page.
import { Suspense } from 'react'
import { SimpleEditor } from '@/components/tiptap-templates/simple/simple-editor'
export default function Page() {
return (
<Suspense fallback={<p role="status">Loading editor...</p>}>
<SimpleEditor />
</Suspense>
)
}To also publish the editor on the home page, use the same page code in app/page.tsx or src/app/page.tsx.
Add Tiptap components
You can also install individual components into an existing editor. For example, run pnpm dlx @tiptap/cli@latest add heading-button, then pass the editor instance to the button. Heading button
Add styles
The CLI adds the shared style imports to app/globals.css or src/app/globals.css when it finds the file. If your root layout imports another stylesheet, add the imports there. Style setup