# react-quill
**Repository Path**: ekber/react-quill
## Basic Information
- **Project Name**: react-quill
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2018-09-13
- **Last Updated**: 2020-12-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
React-Quill [](https://travis-ci.org/zenoamaro/react-quill) [](https://www.npmjs.com/package/react-quill)
[](http://www.npmtrends.com/react-quill)
==============================================================================
A [Quill] component for [React].
See a [live demo] or [Codepen](http://codepen.io/alexkrolick/pen/xgyOXQ/left?editors=0010#0).
[Quill]: https://quilljs.com
[React]: https://facebook.github.io/react/
[live demo]: https://zenoamaro.github.io/react-quill/
1. [Quick start](#quick-start)
1. [Import the component](#import-the-component)
1. [Import the stylesheet](#import-the-stylesheet)
1. [Use the component](#use-the-component)
1. [Using Deltas](#using-deltas)
1. [Controlled vs Uncontrolled Mode](#controlled-vs-uncontrolled-mode)
1. [Options](#options)
1. [Theme](#theme)
1. [Custom Toolbar](#custom-toolbar)
1. [Custom Formats](#custom-formats)
1. [Custom Editing Area](#custom-editing-area)
1. [Mixin](#mixin)
1. [Upgrading to React-Quill v1.0.0](#upgrading-to-react-quill-v100)
1. [API reference](#api-reference)
1. [Exports](#exports)
1. [Props](#props)
1. [Methods](#methods)
1. [Browser support](#browser-support)
1. [Building and testing](#building-and-testing)
1. [Bundling with Webpack](#bundling-with-webpack)
1. [Changelog](./CHANGELOG.md)
1. [Contributors](#contributors)
1. [License](#license)
---
💯 **React Quill now supports Quill v1.0.0!**
Thanks to @clemmy and @alexkrolick for landing this much-awaited change. There are many breaking changes, so be sure to read the [migration guide](#upgrading-to-react-quill-v100).
---
```sh
npm install react-quill
yarn add react-quill
```
Special thank you to everyone who contributed during the 1.0.0 release cycle!
## Quick Start
### Import the component
```jsx
import ReactQuill from 'react-quill'; // ES6
import * as ReactQuill from 'react-quill'; // Typescript
const ReactQuill = require('react-quill'); // CommonJS
```
### Import the stylesheet
_Two common examples are shown below. How stylesheets are included in your app depends on build system (Webpack, SCSS, LESS, etc). See the documentation on [Themes](#theme) for more information._
#### Fetching styles from the CDN
```html
```
#### Using `css-loader` with Webpack or `create-react-app`
```jsx
require('react-quill/dist/quill.snow.css'); // CommonJS
import 'react-quill/dist/quill.snow.css'; // ES6
```
### Use the component
```jsx
class MyComponent extends React.Component {
constructor(props) {
super(props)
this.state = { text: '' } // You can also pass a Quill Delta here
this.handleChange = this.handleChange.bind(this)
}
handleChange(value) {
this.setState({ text: value })
}
render() {
return (
Example Code
```jsx
var MyComponent = React.createClass({
modules: {
toolbar: [
[{ 'header': [1, 2, false] }],
['bold', 'italic', 'underline','strike', 'blockquote'],
[{'list': 'ordered'}, {'list': 'bullet'}, {'indent': '-1'}, {'indent': '+1'}],
['link', 'image'],
['clean']
],
},
formats: [
'header',
'bold', 'italic', 'underline', 'strike', 'blockquote',
'list', 'bullet', 'indent',
'link', 'image'
],
render: function() {
return (
Example Code
```jsx
/*
* Custom "star" icon for the toolbar using an Octicon
* https://octicons.github.io
*/
const CustomButton = () =>
/*
* Event handler to be attached using Quill toolbar module
* http://quilljs.com/docs/modules/toolbar/
*/
function insertStar () {
const cursorPosition = this.quill.getSelection().index
this.quill.insertText(cursorPosition, "★")
this.quill.setSelection(cursorPosition + 1)
}
/*
* Custom toolbar component including insertStar button and dropdowns
*/
const CustomToolbar = () => (
Example Code
```js
const ReactQuill = require('react-quill'); // CommonJS
import ReactQuill, { Quill } from 'react-quill'; // ES6
```
```jsx
/*
* Example Parchment format from
* https://quilljs.com/guides/cloning-medium-with-parchment/
* See the video example in the guide for a complex format
*/
let Inline = Quill.import('blots/inline');
class BoldBlot extends Inline { }
BoldBlot.blotName = 'bold';
BoldBlot.tagName = 'strong';
Quill.register('formats/bold', BoldBlot);
const formats = ["bold"] // add custom format name + any built-in formats you need
/*
* Editor component with default and custom formats
*/
class MyComponent extends React.Component {
constructor(props) {
this.formats = formats
this.state = { text: '' }
}
handleChange(value) {
this.setState({text: value})
}
render() {
return (