Rich Text Editor

Forms
Editor

A versatile text editing component with 6 variants for different use cases, from simple comments to full document editing with AI assistance.

Minimal

Lightweight editor for quick comments, feedback, and short notes

Comments & Notes
0 / 500

Basic

Essential formatting options for everyday content creation

General Purpose
0 words0 / 2,000

Standard

Full formatting with headings, alignment, and text styling options

Blog & Articles
0 wordsReading time: ~1 min
0 / 5,000

Advanced

Complete editing suite with tables, images, code blocks, and fullscreen mode

Full-Featured
0 words0 lines~1 min read
Last saved: Just now0 / 20,000

AI-Enhanced

Integrated AI writing assistant for improving, expanding, and translating content

AI-Powered
0 wordsAI-enhanced
0 / 10,000

Markdown

Split-view Markdown editor with live preview for technical documentation

Developer-Friendly

Welcome to Markdown Editor

This editor supports bold, italic, and strikethrough text.

Features


  • Live preview

  • Syntax highlighting

  • Full Markdown support
  • const greeting = "Hello, World!";
    console.log(greeting);

    This is a blockquote for important notes.

    Learn more at Eidetic Design System.

    Markdown supported47 words
    354 / 15,000

    Variant Comparison

    Choose the right editor for your use case

    VariantUse CaseKey Features
    MinimalComments, quick notesBold, italic, emoji, mentions
    BasicGeneral text editingLists, links, basic formatting
    StandardBlog posts, articlesHeadings, alignment, blockquotes, code
    AdvancedDocuments, reportsTables, images, colors, fullscreen
    AI-EnhancedContent creationAI writing assistance, tone adjustment
    MarkdownTechnical docsSplit view, live preview, syntax support

    Props

    Common props for all editor variants

    PropTypeDefaultDescription
    placeholderstringPlaceholder text shown when empty
    maxLengthnumberMaximum character count
    variant'default' | 'error''default'Visual variant for validation
    classNamestringAdditional CSS classes
    onChange(html: string, text: string) => voidChange handler

    AIEnhancedEditor Additional Props

    PropTypeDefaultDescription
    onAIAction(action: string, content: string) => voidAI action callback

    MarkdownEditor Additional Props

    PropTypeDefaultDescription
    defaultValuestringInitial markdown content
    onChange(markdown: string) => voidMarkdown change handler

    Usage

    Import and implementation example

    import {
      MinimalEditor,
      BasicEditor,
      StandardEditor,
      AdvancedEditor,
      AIEnhancedEditor,
      MarkdownEditor,
    } from '@/blocks/forms/rich-text-editor'
    
    export default function Example() {
      return (
        <>
          {/* Minimal - for comments */}
          <MinimalEditor
            placeholder="Add a comment..."
            maxLength={500}
            onChange={(html, text) => console.log(text)}
          />
    
          {/* Basic - general editing */}
          <BasicEditor
            placeholder="Start typing..."
            maxLength={2000}
          />
    
          {/* Standard - blog posts */}
          <StandardEditor
            placeholder="Write your article..."
            maxLength={5000}
            onChange={(html, text) => console.log(html)}
          />
    
          {/* Advanced - full editing */}
          <AdvancedEditor
            placeholder="Write your content..."
            maxLength={20000}
          />
    
          {/* AI-Enhanced - with AI assistance */}
          <AIEnhancedEditor
            placeholder="Write something amazing..."
            maxLength={10000}
            onAIAction={(action, content) => {
              console.log('Action:', action)
              console.log('Content:', content)
            }}
          />
    
          {/* Markdown - for developers */}
          <MarkdownEditor
            placeholder="Write in Markdown..."
            maxLength={15000}
            defaultValue="# Hello World"
            onChange={(markdown) => console.log(markdown)}
          />
        </>
      )
    }

    Features

    Built-in functionality

    • Six variants: From minimal to full-featured editing
    • WYSIWYG editing: Content editable with visual formatting
    • Character counting: Track character and word counts
    • Keyboard shortcuts: Ctrl+B, Ctrl+I, Ctrl+U and more
    • AI assistance: Improve, expand, and translate content
    • Markdown preview: Split view with live rendering
    • Table support: Insert and edit tables (Advanced)
    • Dark mode: Full dark mode support

    Accessibility

    Accessibility considerations

    ARIA Attributes

    Content editable has proper roleToolbar buttons have title attributesFocus states meet WCAG 2.4.7

    Keyboard Navigation

    KeyAction
    Ctrl+BToggle bold
    Ctrl+IToggle italic
    Ctrl+UToggle underline
    TabNavigate toolbar buttons

    Notes

    • Clear focus ring with 2px width
    • Color contrast 4.5:1 for text
    • Visual feedback for character limit
    • Toolbar buttons are keyboard accessible

    Related Components