vue-html-viewer

In order to add the package to your application, install it with `npm` and then include it in your Vue component like this
1,211
Install
npm install vue-html-viewer
Latest Version:1.0.4
Vue:2
License:MIT
Last Updated:Jan 5, 2023
Links: GitHub  ·  npm
Maintainer: todorivanov

vue-html-viewer

Setup

In order to add the package to your application, install it with npm

npm install vue-html-viewer --save

and then include it in your Vue component like this

import HtmlPreview from 'vue-html-viewer';

How to use

The HtmlPreview component uses Slots in order to render your HTML. To use the component, simply import it in your Vue Component and then provide the respective HTML like this

<HtmlPreview>
 <div class="input">
      <a>Hello</a>
  </div>
</HtmlPreview>

The visual representation will be the following:

Image of the HTML viewer

You can view the HTML via the Switch button

Image of the HTML viewer

Version History

Version Released Vue License
1.0.4 ^2.6.10 MIT
1.0.3 ^2.6.10 MIT
1.0.2 ^2.6.10 MIT
1.0.1 ^2.6.10 MIT
1.0.0 ^2.6.10 MIT