nshenderov / strapi-plugin-ckeditor

Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)
https://www.npmjs.com/package/@_sh/strapi-plugin-ckeditor
MIT License
95 stars 58 forks source link

custom sanitization in htmlEmbed.sanitizeHtml #136

Closed jkefc closed 7 months ago

jkefc commented 7 months ago

Hello,

I asked my question in the discussions section, but then saw discussions tab doesn't really get views, so decided to post in the issues section too. I apologise for repeating myself.

In file /admin/src/components/Input/CKEditor/configs/base.js line 292 there is the definition of the htmlEmbed.sanitizeHtml method. It is using the sanitize-html module with default settings. I would like to extend the sanitiser settings to fit my requirements, but I can't do that in ckeditor.txt because that gets executed in the browser, so npm packages are not available. How could I change the sanitiser options?

jkefc commented 7 months ago

Sorry, decided to not go this route and just add sanitization in the get controller.