You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#111197 JCE stripping javascript from module but not article

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

footstepsdesign
JCE stripping javascript from module but not article

Hi, first off I’m using Joomla 4.1.3

I have JCE installed and it is my editor for both articles and modules.
I have created a very simple module that uses form fields to manage and display an accordion (faq)

When I add a simple javascript to an article it works fine
When add the same javascript to a custom html module it works fine
but when I add the same javascript to my faq module and save it, the code is stripped out.

Can anyone point me to where I may be going wrong, either with my code or the JCE settings.

Thanks

EDIT: I've worked it out and it was my fault:

In the XML for my faq module l had the wrong filter set:
OLD: <field name="answer" type="editor" filter="safehtml" height="100px" label="answer" />
NEW: <field name="answer" type="editor" filter=“raw” height="100px" label="answer" />