We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

RTE field stripping out javascript

How Do I?

Ben Cornwell's avatar
Ben Cornwell
5 posts
5 years ago
Ben Cornwell's avatar Ben Cornwell

I’m trying to embed a booking function from eventbrite website into an entry using an RTE field. The embed code uses javascript to work but when I paste the code into the source window of the field, it is stripped out immediately. Is there a way for it to allow this as I have had to resort to creating another text area field which then renders it properly?

       
earthisland's avatar
earthisland
45 posts
5 years ago
earthisland's avatar earthisland

Hi, I have had the same problem; the RTE does some rewriting when you switch from code view back to the WYSIWYG. This happens in the built-in RTE and in the 3rd party one we have based on CKeditor. Probably trying to be helpful…

Two workarounds: ‘save and close’ rather than ‘save’ from the code window (don’t let it go back to the WYSIWYG); and, add a text-field to the template that doesn’t use the RTE just after the RTE field. The former method means that any time you edit the post content, you’ll have to re-add the script.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.