react-quill
react-quill copied to clipboard
How to display the content in the editor outside the editor
Suppose I have the markup stored. I want to display the text in another div . I tried using dangerouslySetInnerHTML , which shows error in the web page . Is this something like rendering the editor Itself by hidding the editor markdown buttons and other styles which will make the editor look like a normal div.
@hussamkhatib what did you end up doing here? Running into the same roadblock.
I rendered the editor itself without readOnly prop.
import 'react-quill/dist/quill.snow.css'
import dynamic from 'next/dynamic'
import React, { FC, ReactElement } from 'react'
interface Props {
defaultValue: any
}
const ReactQuill = dynamic(() => import('react-quill'), { ssr: false })
const TextEditorReadOnly: FC<Props> = ({ defaultValue }): ReactElement => (
<ReactQuill defaultValue={defaultValue} readOnly theme="bubble" />
)
export default TextEditorReadOnly