3

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!

4

1 回答 1

3

您不应该呈现消息值,而是将其显示为某个标签的 innerHtml:

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

看看Angular HTML 绑定

于 2018-11-27T21:30:40.957 回答