0

I'm using react-quill as a rich-text editor. I need to insert an already existing HTML code so it will be displayed as a text inside of the editor. Is there any ability to do something like this?

let htmlSample = "<p>It's a test html <b>to be inserted!</b></p>
<ReactQuill htmlValue="{htmlSample}" />

And the results would look like: enter image description here

Lab Lab
  • 781
  • 10
  • 34

1 Answers1

0

Okay, I got this. If anyone else wonders how to insert plain html - simply put your custom editor area like this:

<ReactQuill value={this.state.value}>
<div class="your-custom-container">
<p>your custom html</p>
</div>
</ReactQuill>
Lab Lab
  • 781
  • 10
  • 34