React Quill Component

2.0.0 · active · verified Sun Apr 19

React-Quill is a robust React component that wraps the popular Quill rich-text editor, allowing developers to easily integrate a powerful WYSIWYG editing experience into their React applications. The current stable version is 2.0.0, which introduced a full TypeScript port, React 16+ compatibility, and a refactored build system, aiming for a drop-in upgrade for most users. While major releases, like v2, occur periodically with significant overhauls, the project generally maintains an active development pace with bug fixes and minor improvements. A key differentiator is its seamless integration with React's component lifecycle, abstracting away much of Quill's imperative API. It supports controlled mode with specific caveats, leveraging Quill's Delta format for content management and offering extensive customization options for toolbars and formats. It is designed to be highly extensible and performant within a React ecosystem, making it a go-to choice for rich-text editing needs.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates a basic controlled `ReactQuill` component using the 'snow' theme, managing editor content with React's `useState` hook.

import React, { useState } from 'react';
import ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css';

function MyComponent() {
  const [value, setValue] = useState('');

  return (
    <div style={{ height: '300px', display: 'flex', flexDirection: 'column' }}>
      <h3>ReactQuill Editor</h3>
      <ReactQuill 
        theme="snow" 
        value={value} 
        onChange={setValue} 
        style={{ flexGrow: 1, overflowY: 'auto' }} 
        placeholder="Start typing here..."
      />
      <p>Current content length: {value.length}</p>
    </div>
  );
}

view raw JSON →