Mohammad Shehadeh

Rich Text Editor

Forms 20

About

Tiptap editor with a formatting toolbar (headings, lists, links, highlight, alignment) and a hover bubble to edit or unlink links inline. Outputs HTML, controlled or uncontrolled, with composable parts.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Rich Text Editor to your project and fits it to your theme.

Code

How Rich Text Editor is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import * as React from "react";

import RichTextEditor from "@/components/ui/rich-text-editor";

export default function RichTextEditorDemo() {
  const [value, setValue] = React.useState(
    '<h2>Release notes</h2><p>We shipped a <strong>rich text editor</strong> with <em>formatting</em>, lists, and <mark>highlights</mark>. Visit a <a href="https://hirael.com">link</a> to edit or unlink it.</p><ul><li>Headings, quotes, and code</li><li>Links and text alignment</li></ul>',
  );

  return (
    <div className="mx-auto w-full max-w-2xl p-6">
      <RichTextEditor
        value={value}
        onValueChange={setValue}
        placeholder="Write something…"
      />
    </div>
  );
}

Dependencies

More by Mohammad Shehadeh

View all
  • Feature Problem Cards

    Feature Problem Cards

    90
  • Feature Grid Spotlight Cards

    Feature Grid Spotlight Cards

    73
  • Ecommerce Category Page

    Ecommerce Category Page

    72
  • Split Login

    Split Login

    68
  • Comparison Section

    Comparison Section

    65
  • Dithered Shader CTA

    Dithered Shader CTA

    64
  • Comparison Table

    Comparison Table

    64
  • FAQ Two Column

    FAQ Two Column

    63

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Login 1

    Login 1

    53
  • Form

    Form

    137
  • Card Studio

    Card Studio

    41
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K
  • SignInPage

    SignInPage

    667

Explore more

Part of Hirael — browse the full library on 21st.dev.