neoscms

Neos CMS: Add <script> to HTML element


i'm trying to add <script> ... </script> to HTML element in Neos CMS, could you please tell me how to do it, because HTML element in Neos CMS doesn't accept js. Is there any alternative how to do it please. Thanks for any recommendations.


Solution

  • There is a package available with wich the editor can add source code like that. But be careful with this feature as with great power (of the editor) comes great responsibility!

    Depending on what your use case is, it may be more secure to provide a custom NodeType for the editor which then adds this JS code via fusion.

    One thing you may want to think about is loading things from external sources might be problematic for GDPR compliance.