@djyde/react-quill
v0.1.2
Published
Quilljs in React
Downloads
10
Readme
ReactQuill
Quilljs in React. Based on Quill 1.0
Install
$ npm install @djyde/react-quill --save-dev
Quick Start
import React from 'react'
import ReactQuill from 'react-quill'
// import stylesheet
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
class Editor extends React.Component {
render () {
const options = {
theme: 'snow'
}
function onChange (html) {
console.log(html)
}
const events = {
'text-change': delta => {
console.log(delta)
}
}
return (
<div>
<ReactQuill options={options} events={events} onChange={onChange} ref='editor'/>
</div>
)
}
}
// render <Editor />
API
props
onChange(html)
options
An options object
- events
An object contains events
methods
- getHTML()
Get the HTML
members
- $quill
The quill instance
- $el
The quill element
License
MIT License