GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Tiptap Docs
  • UI Components
  • Website
  • Sign up
  • Install
  • Style
  • CLI
  • Changelog
  • Simple Editor
  • Notion EditorPaid
  • DOCX EditorPaid
  • Overview
  • Components
  • Node components

This view

  • Original page
  • New address

GeezerVison is showing tiptap.dev — Paragraph node | Tiptap UI Components

Comprehensive styling for the core paragraph node and various other text elements in the Tiptap editor.

Installation

You can add the node component via Tiptap CLI

npx @tiptap/cli@latest add paragraph-node

Usage

The ParagraphNode provides styling for paragraphs and other text-related elements within the editor. To use it, include it in your project alongside the Tiptap editor.

'use client'

import { useEditor, EditorContent } from '@tiptap/react'
import { StarterKit } from '@tiptap/starter-kit'

import '@/components/tiptap-node/paragraph-node/paragraph-node.scss'

export default function BasicEditor() {
  const editor = useEditor({
    immediatelyRender: false,
    extensions: [StarterKit],
    content: `
      <h1>Heading 1</h1>
      <h2>Heading 2</h2>
      <p>A paragraph with <a href="#">a link</a> and <strong>bold text</strong>.</p>
      <blockquote>A blockquote with some insightful text.</blockquote>
      <hr/>
      <p>Another paragraph after a horizontal rule.</p>
    `,
  })

  return <EditorContent editor={editor} />
}

Styling

The stylesheet sets paragraph spacing and line height. It also styles links, selections, mentions, collaboration carets, and placeholder decorations when the corresponding extensions are active. Add the node-specific styles for headings, blockquotes, and horizontal rules when your editor uses them.

PreviouslyMathematics node
Next upTable node
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.