ui-rich-text-editor

Implements a TipTap-based rich text editor component integrated with React Hook Form.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill ui-rich-text-editor-aurelian1974
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ui-rich-text-editor
Source: https://github.com/Aurelian1974/ERPEnterprise/tree/main/.github/skills/ui-rich-text-editor
Command: npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill ui-rich-text-editor-aurelian1974

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @tiptap/react, @tiptap/pm, @tiptap/starter-kit, @tiptap/extension-placeholder, @tiptap/extension-link, @tiptap/extension-table, @tiptap/extension-table-row, @tiptap/extension-table-header, @tiptap/extension-table-cell, @tiptap/extension-character-count.

What problem does it solve? Building formatted text inputs (notes, descriptions, document content) for ERP forms requires wiring a WYSIWYG editor into React Hook Form, handling empty-state HTML output, character limits, and toolbar variants—work that is repetitive and error-prone when done from scratch. ## Core Features & Use Cases - TipTap RichTextEditor component: Configurable toolbar variants (minimal, standard, full) with Bold, Italic, Strike, Headings, Lists, Link, and Undo/Redo extensions. - React Hook Form integration: Controlled via Controller with Zod schema validation on the HTML string output. - Character count and empty-state handling: Optional maxLength counter with over-limit styling, and empty editors return an empty string instead of '<p></p>'. - Use Case: Add a description field to an ERP product form with a standard toolbar, 200px minimum height, and Zod validation requiring 10–5000 characters. ## Quick Start Ask the AI to add a TipTap rich text editor field with a standard toolbar to a React Hook Form ERP form, wired through Controller with Zod validation.

Frequently Asked Questions about ui-rich-text-editor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate TipTap with React Hook Form?▼

Wrap the TipTap-based editor in a React Hook Form Controller or FormField render prop, passing field.value to the editor's value prop and field.onChange to its onChange callback. The editor emits an HTML string on every update, which Zod can validate as a plain string.

How do I build a rich text editor toolbar in TipTap?▼

Create a toolbar component that receives the TipTap Editor instance and calls chain commands like editor.chain().focus().toggleBold().run(). Use editor.isActive('bold') to highlight active states, and set type="button" on each button to prevent accidental form submission.

Why does TipTap return '<p></p>' when the editor is empty?▼

TipTap always wraps content in paragraph nodes, so getHTML() returns '<p></p>' for empty editors. Check editor.isEmpty in the onUpdate callback and emit an empty string instead, which keeps database storage and Zod min-length validation consistent.

How do I add a character limit to a TipTap editor?▼

Install @tiptap/extension-character-count and configure it with a limit option. Read the current count via editor.storage.characterCount.characters() and display it in a counter below the editor, applying danger styling when the count exceeds the maximum.

Can TipTap output be stored directly in a database?▼

Yes, the editor outputs an HTML string that can be stored as NVARCHAR(MAX) in a database. Validate the raw HTML string with Zod rules like z.string().min(10).max(5000) before submission to enforce content constraints.