Files
web-temp/layers/plugins/dompurify-html.ts
2025-11-13 10:59:21 +09:00

56 lines
917 B
TypeScript

import VueDOMPurifyHTML from 'vue-dompurify-html'
export default defineNuxtPlugin(nuxtApp => {
nuxtApp.vueApp.use(VueDOMPurifyHTML, {
default: {
ALLOWED_TAGS: [
'br',
'div',
'b',
'strong',
'i',
'em',
'u',
's',
'a',
'p',
'ol',
'ul',
'li',
'span',
'img',
'pre',
'iframe',
'input',
'dl',
'dt',
'dd',
'blockquote',
'table',
'thead',
'tbody',
'tfoot',
'tr',
'th',
'td',
],
ALLOWED_ATTR: [
'style',
'id',
'href',
'src',
'target',
'alt',
'class',
'width',
'height',
'frameborder',
'allowfullscreen',
'colspan',
'rowspan',
'scope',
],
},
})
})