Skip to content

Instantly share code, notes, and snippets.

@MuhammadMinhaj
Last active October 4, 2020 18:43
Show Gist options
  • Save MuhammadMinhaj/9badeae41857f05132e20e8c82f06c60 to your computer and use it in GitHub Desktop.
Save MuhammadMinhaj/9badeae41857f05132e20e8c82f06c60 to your computer and use it in GitHub Desktop.
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