1

I was wondering if there was any way of being able to edit the WysiHat settings to allow script/form tags to be entered into them. We have a client who has a third party widget which require JS, and a PayPal form which he wants to be able to put on his site, and move around using the default RTE. However whenever he pastes them in code view and returns to content view, they get stripped.

I've added textarea and rte to skip_xss_fieldtypes in Channel_form_lib (line 3155) but it's still doing it when swapping between code and content view. If anyone could give me a hand on how to fix this without resorting in switching to a third party WYSIWYG, that would be great.

Thanks, Jon

EDIT: Just did some further investigation, when pasting a script tag in code view and then submitting (without switching it back to content) it comes through fine. However when you then go to edit the entry again, it initialises as content view and the script tag disappears, could this be because the script tag isn't a visible element by default?

Also when pasting a form in and switching back to content view, the form tags get stripped. I thought this might have something to do with the fact that you're already inside a form tag so it's stripping the tags it sees as being unnecessary. Then when you hit submit it's trying to validate the fields that're pasted in (if they have required set, it won't let you submit).

Seems like this might be a bigger issue than just switching a setting over, but I appreciate any useful comments that are left.

1

Sounds like a perfect user case for krea elements: http://devot-ee.com/add-ons/content-elements

You could have a 'script' field as a separate entity and arrange it before/after any other fields required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.