Skip to content

Commit

Permalink
Add documentation for allowed attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
axlwaii committed Oct 17, 2023
1 parent 6db46c5 commit bb39b91
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ It is also possible to provide custom allowed tags directly to the directive tag
</template>
```

#### allowedAttributes

Array of strings. Default: []

Customize the tag attributes that are allowed to be rendered:

```js
Vue.use(VueSafeHTML, {
allowedTags: ['a'],
allowedAttributes: ['title', 'class', 'href'],
});

### Nuxt

`vue-safe-html` is written as a Vue plugin so you can easily use it inside Nuxt by following [the Nuxt documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins#vue-plugins).
Expand Down

0 comments on commit bb39b91

Please sign in to comment.