0

I am using the Quill editor (via ngx-quill) to give my user the ability to edit documents. When the documents are displayed I show them like this:

  <div [innerHTML]="doc.text"></div>

This works reliably, but the styling of the content of the div tag is quite different from what you see in the Quill editor window. What I want to do is apply the Quill content stylesheet to my div tag, but I haven't been able to find any document to do that. Does anyone here know how to do that?

I know one alternative is to invoke a Quill editor in read-only mode and without a tool-bar. That's my fall-back but I would prefer not to do that.

AlanObject
  • 9,613
  • 19
  • 86
  • 142

1 Answers1

0

I was facing the same issue. Some inline styles are displayed, but the styles applied from the Quill.js class are not applied. post-content is class of div containing the content:

let content=document.querySelector('.post-content')
 content.innerHTML=content.innerText
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Adnan Malik
  • 71
  • 1
  • 4