react-for-quill
v1.0.5
Published
This is component for quill based on [email protected] and bun
Downloads
37
Maintainers
Readme
It is based on bun & quill v2
Quick Start
Make sure you have react
and react-dom
With NPM:
npm install react-for-quill --save
Prepare Assets
Embed your theme's source of quill which u want use. Root assets from quill-theme
Choose your theme what you want snow
or bubble
, embed style to root html.
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.snow.css" rel="stylesheet" />
or
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.bubble.css" />
Basic Usage
Implement your code
import React, { useState } from 'react';
import ReactQuill from 'react-for-quill';
import 'react-quill/dist/quill.snow.css';
function MyComponent() {
const [value, setValue] = useState<RFQValue>('');
const onChange = (html: string, delta: Delta, oldContent: Delta, source: EmitterSource) => {
setValue(html);
};
return (
<>
<ReactForQuill
style={{ width: 500, height: 500 }}
theme='snow' // or bubble
value={value}
onChange={onChange}
/>
</>
);
}
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/Duc-Developer/react-for-quill. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
If you wish to contribute, see CONTRIBUTING for development instructions and check out our pinned roadmap issue for a list of tasks to get started.