Monaco Editor is removing html and style tags

96 views Asked by At

I am Using Monaco Editor in my project, When I am posting Html content in monaco editor, and previewing the same content, html and style tags are being removed. so styles are not being applied in the preview section. Is there any way to include those tags, so as to work as expected. I am adding images for reference.

I am adding code for Reference:

<ngx-monaco-editor
[options]="editorOptions"
(onInit)="onInit($event)"
[(ngModel)]="code">
</ngx-monaco-editor>
<div
[innerHTML]="code"></div>

adding HTML Editor and preview for reference:

editor and preview

0

There are 0 answers