Last active
October 4, 2020 18:43
-
-
Save MuhammadMinhaj/9badeae41857f05132e20e8c82f06c60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import 'react-quill/dist/quill.snow.css'; | |
| import { Grid, FormControl, FormLabel } from '@material-ui/core' | |
| import ReactQuill, { Quill, Mixin, Toolbar } from 'react-quill' | |
| export default () => { | |
| const quillModules = { | |
| toolbar: [ | |
| [{ header: [1, 2, false] }], | |
| ['bold', 'italic', 'underline', 'strike', 'blockquote'], | |
| [{ list: 'ordered' }, { list: 'bullet' }, { indent: '-1' }, { indent: '+1' }], | |
| ['link', 'image'], | |
| ['clean'], | |
| ], | |
| } | |
| const quillFormats = ['header', 'bold', 'italic', 'underline', 'strike', 'blockquote', 'list', 'bullet', 'indent', 'link', 'image'] | |
| return ( | |
| <div className="_quill"> | |
| <ReactQuill theme="snow" modules={quillModules} formats={quillFormats} toolbar={false} bounds={'._quill'}> | |
| {/* <div key="editor" ref="editor" className="quill-contents border_solid_top" dangerouslySetInnerHTML={{ __html: state.editorContent }} /> */} | |
| </ReactQuill> | |
| </div> | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment