Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 10x 10x 10x 10x 10x 10x 12x | import hljs from 'highlight.js'
import katex from 'katex'
import ReactQuill from 'react-quill'
window.katex = katex
const modules = {
syntax: {
highlight:
/* istanbul ignore next */
(text: string) => hljs.highlightAuto(text).value,
},
toolbar: [
[{ font: [] }, { size: [] }],
['bold', 'italic', 'underline', 'strike'],
[{ color: [] }, { background: [] }],
[{ script: 'super' }, { script: 'sub' }],
[{ header: '1' }, { header: '2' }, 'blockquote', 'code-block'],
[{ list: 'ordered' }, { list: 'bullet' }, { indent: '-1' }, { indent: '+1' }],
[{ direction: 'rtl' }, { align: [] }],
['link', 'image', 'video', 'formula'],
['clean'],
],
}
export const RichtextEditor = (props: ReactQuill.ReactQuillProps) => {
return <ReactQuill theme='snow' modules={modules} {...props} />
}
|