re-quill

0.1.4 • Public • Published

React Quill

base on quill@1.3.7

inspired by https://github.com/zenoamaro/react-quill

Example

import React from "react";
import ReactDOM from "react-dom";
import ReactQuill from "."; // ES6

function Example() {
	const [value, setValue] = React.useState("hello world");
	const quill = React.useRef();
	return (
		<div>
			<ReactQuill
				ref={quill}
				placeholder="type something.."
				value={value}
				onChange={(html, _delta, _source) => setValue(html)}
			/>
			<div className="html">
				<div dangerouslySetInnerHTML={{ __html: value }}></div>
			</div>
		</div>
	);
}

ReactDOM.render(<Example />, document.getElementById("root"));

API

Checkout here

Package Sidebar

Install

npm i re-quill

Weekly Downloads

4

Version

0.1.4

License

none

Unpacked Size

4.24 kB

Total Files

3

Last publish

Collaborators

  • fizwen