Setting this configuration option will enable HTML features that are not explicitly supported by any other dedicated CKEditor 5 features.
const htmlSupportConfig.allow = [
{
name: 'div', // Enable 'div' element support,
classes: [ 'special-container' ], // allow 'special-container' class,
styles: 'background', // allow 'background' style,
attributes: true // allow any attribute (can be empty).
},
{
name: 'p', // Extend existing Paragraph feature,
classes: 'highlighted' // with 'highlighted' class,
attributes: [
{ key: 'data-i18n-context, value: true } // and i18n attribute.
]
}
];