javascript
const htmlSupportConfig = {
allow: {
elements: {
article: true,
audio: {
type: 'Block',
attributes: {
controlsList: 'Enum#nodownload,noremote',
playsInline: 'Bool'
},
},
bdi: {
type: 'Inline',
attributes: {
dir: 'Enum#ltr,rtl'
},
},
canvas: {
type: 'Block',
attributes: {
width: 'Length',
height: 'Length'
},
},
data: {
type: 'Block',
attributes: {
value: 'CDATA'
},
},
datalist: true,
details: {
type: 'Block',
attributes: {
open: 'Bool'
},
},
dialog: {
type: 'Block',
attributes: {
open: 'Bool',
returnValue: 'Text',
method: 'Text',
target: 'Text',
rel: 'Text',
noopener: 'Bool'
},
},
embed: {
type: 'Empty',
contents: 'Embedded',
attributes: {
// 'any': 'any'
},
},
figcaption: true,
figure: true,
footer: true,
header: true,
main: true,
mark: 'Inline',
menu: true,
nav: true,
meter: {
type: 'Inline',
contents: 'Phrase',
attributes: {
value: 'Number',
min: 'Number',
max: 'Number',
low: 'Number',
high: 'Number',
optimum: 'Number'
},
},
output: {
type: 'Inline',
attributes: {
for: 'Text',
form: 'Text',
name: 'CDATA'
},
},
progress: {
type: 'Inline',
contents: 'Phrase',
attributes: {
value: 'Number',
min: 'Number',
max: 'Number'
},
},
section: true,
source: {
type: 'Block',
attributes: {
media: 'Text',
sizes: 'Text',
srcset: 'Text',
src: 'URI',
type: 'Enum#video/ogg,audio/ogg,video/mp4,audio/mp4,video/webm,audio/webm',
},
},
template: {
type: 'Block',
attributes: {
// 'any': 'any'
},
},
summary: true,
time: {
type: 'Inline',
contents: 'Phrase',
attributes: {
datetime: 'CDATA'
},
},
track: {
type: 'Empty',
contents: 'Media',
attributes: {
src: 'URI',
kind: 'Enum#captions,subtitles,descriptions,chapters',
srclang: 'LanguageCode',
label: 'Text',
},
},
video: {
type: 'Block',
attributes: {
src: 'URI',
type: 'Enum#video/ogg,video/mp4,video/webm',
autoplay: 'Bool',
controls: 'Bool',
loop: 'Bool',
muted: 'Bool',
poster: 'URI',
width: 'Length',
height: 'Length',
controlsList: 'Enum#nodownload,noremote',
preload: 'Enum#auto,metadata,none',
mediagroup: 'Text',
playsInline: 'Bool',
},
},
area: {
type: 'Empty',
contents: 'Interactive',
attributes: {
alt: 'Text',
coords: 'Text',
href: 'URI',
hreflang: 'LanguageCode',
media: 'Text',
rel: 'Text',
shape: 'Enum#circle,poly,rect',
target: 'Text',
},
},
},
},
};