Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to render the ngx-quill-editor content without html tags on JHipster project?

I'm new to the JHipster and Angular6. I've created a project using JHipster and included ngx-quill-editor for an editor. I'm able to save the data using this editor, but when I retrieve the data from the database to display on another page to preview it shows HTML tags. I'm not sure that do I've to render when I'm saving into the database or retrieving from the database or is there any tag which I'm missing eighter saving or retrieving content to render?

<quill-editor name="message" [(ngModel)]="message" required></quill-editor>

I didn't find any tutorial for this example. Any help would be appreciated.

Thanks!

like image 619
Ram Avatar asked Sep 15 '25 17:09

Ram


1 Answers

You should not render the message value, but show it as an innerHtml of some tag:

<div [innerHTML]="message"></div>

Take a look at Angular HTML binding

like image 129
D00de Avatar answered Sep 17 '25 20:09

D00de