Editor

The Editor component is a powerful and flexible text editor that allows you to create and edit rich text content.

Installation

npx love-ui@latest add editor

Usage

import { EditorProvider, EditorFloatingMenu, EditorBubbleMenu, EditorNodeHeading1, EditorNodeBulletList, EditorFormatBold, EditorFormatItalic } from "@/components/editor"
<EditorProvider>
  <EditorFloatingMenu>
    <EditorNodeHeading1 />
    <EditorNodeBulletList />
  </EditorFloatingMenu>
  <EditorBubbleMenu>
    <EditorFormatBold />
    <EditorFormatItalic />
  </EditorBubbleMenu>
</EditorProvider>

Features

  • Rich text editing with TipTap
  • Slash commands for quick formatting
  • Floating menu for common actions
  • Bubble menu for text selection
  • Text formatting (bold, italic, underline, strikethrough, code, superscript, subscript)
  • Text and background colors
  • Links
  • Clear formatting
  • Tables with column/row management
  • Merge and split table cells
  • Character and word count
  • Code blocks with syntax highlighting
  • Headings (H1, H2, H3)
  • Lists (bullet, ordered, task)
  • Blockquotes
  • Horizontal rules
  • Placeholder text
  • Character limit support

Examples