How to use RegExp in htmlSupport
reinsp5 opened this issue · 1 comments
reinsp5 commented
Hello. Thank you for the useful plugin.
I having one problem.
Trying to use regular expressions in htmlSupport but it is not working.
I'm trying to use Strapi as a CMS for my site.
The site uses an existing CSS framework and I want to write the classes provided by the CSS framework within CKEditor.
So far I have tried the following specifications, but none of them work: the class specification is removed.
How can I help...
- Strapi Ver.4.1.12
- Strapi Plugin CKEditor 5 Ver.1.1.0
- Work in Docker (use setup guide: https://blog.dehlin.dev/docker-with-strapi-v4 ) * use mariadb
Flow at build
- Edit plugin.js
- rm -rdf .cache ( in container )
- rm -rdf build ( in container )
- yarn cache clear --all ( in container )
- yarn build ( in container )
- docker-compose down
- docker-compose up -d
Try. 1
// config/plugins.js
module.exports = () => {
return {
ckeditor: {
enabled: true,
plugin: {
generalHtmlSupport: true,
},
config: {
editor: {
htmlSupport: {
allow: [{
name: /.*/,
classes: true,
}]
}
}
}
}
}
}
Try. 2
// config/plugins.js
module.exports = () => {
return {
ckeditor: {
enabled: true,
plugin: {
generalHtmlSupport: true,
},
config: {
editor: {
htmlSupport: {
allow: [{
name: '/.*/',
classes: true,
}]
}
}
}
}
}
}
Try. 3
// config/plugins.js
module.exports = () => {
return {
ckeditor: {
enabled: true,
plugin: {
generalHtmlSupport: true,
},
config: {
editor: {
htmlSupport: {
allow: [{
name: "/.*/",
classes: true,
}]
}
}
}
}
}
}
AliceRossa commented
Any updates on this? I got this issue too.