cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How can I add JavaScript to a cmsparagraphcomponent?

Former Member
0 Kudos
657

Hello,

I want to add a JavaScript code in the content of the cmsparagraphcomponent from the hmc and cmscockpit?

I tried to add the script in the content directally but the script was removed.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It works now! in the cmscockpit when you add a cmsparagraphcomponent and type in the content make sure you select Source first before typing the script

Answers (1)

Answers (1)

andyfletcher
Active Contributor
0 Kudos

It's the XSSFilter

You can turn it off globally (not recommended) with

 xss.filter.enabled=false

or just for cmscockpit with

 cmscockpit.xss.filter.enabled=false

or just clear specific rules for cmscockpit

 cmscockpit.xss.filter.rule.script_fragments=

The settings are well commented in platform/project.properties

Former Member
0 Kudos

I tried it but it did not work