1

i am using react quill editor and the editor is working fine. but when i display the html content its not in the format shown in editor view. in console i can see that ql-indent class was applied to tag but its not working outside editor. i tried applying quill core.css styles but still no use.

It's difficult to find a guide on displaying quill-editor html content outside the editor. so please help me in handing ql-xxxx classes outside editor.

enter image description here

Thrinath Reddy
  • 280
  • 1
  • 4
  • 12

1 Answers1

13

i fixed it by adding ql-editor class to the preview div tag.

<div className="ql-editor" dangerouslySetInnerHTML={{__html: htmlContent}} />
Prabhu
  • 688
  • 5
  • 11
Thrinath Reddy
  • 280
  • 1
  • 4
  • 12