Categories
JavaScript Vue

Display Unescaped HTML in a Vue App Using the v-html Directive

Spread the love

To display unescaped HTML in a Vue app, we can use the v-html directive.

All we have to do is write:

<div v-html="htmlContent"> </div>

in our template.

Then we’ll see the rendered HTML rendered in the div.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *