vue-sanitize-html-plugin
A sanitizeHtml wrapper for Vue
Description
It's sanitize-html wrapper for Vue.
You can use sanitize
method or v-sanitaize
directive by this plugin.
Example
;; Vue; var myComp = Vue; var vm = el: '#app' components: myComp template: `<div> <my-comp></my-comp> </div>`;
Requirement
vue-sanitize-html-plugin
is intended for use with Vue ^2.5.2.
Install
npm install vue-sanitize-html-plugin --save
or install with yarn:
yarn add vue-sanitize-html-plugin
Usage
Import plugin with options
It's basing vue-sanitize-html-plugin on sanitize-html. So, you can set options.
; Vue;
How to set up a sanitizing target
sanitize
method
var myComp = Vue;
with options
var myComp = Vue;
v-sanitaize
directive
var myComp = Vue;
with options
var myComp = Vue;
Contribution
- Fork it ( http://github.com/shibukk/vue-sanitize-html-plugin/fork )
- Create your feature branch ( git checkout -b my-new-feature )
- Commit your changes ( git commit -am 'Add some feature' )
- Push to the branch ( git push origin my-new-feature )
- Create new Pull Request