[Vuejs]-Is there a way to upload a html document and render it in VueJs?

0👍

Yes it is possible to display the html content in vue js application

If you use double mustache

<span> {{ htmlContent }} </span>

the html content will not get parsed by the browser, it will be a raw string

If you use v-html directive

<span v-html="rawHtml"></span>

All the html content will be displayed in the UI

0👍

@Chans the method you showed as I said was to render HTML Document. But I should have been more clear in my question and your answer is correct based on the question I asked, but if anyone is trying to do the same thing i.e trying to fetch base64 encoded data (Html) from the database and wants to render it on Front End, You need to first decode the data (atob). I hope this helps someone.

Leave a comment