Elxis CMS Forum

Support => FAQs => Topic started by: eliasan on December 28, 2006, 16:35:21

Title: Adding JavaScript to content
Post by: eliasan on December 28, 2006, 16:35:21
Some times we need to include JavaScript on our content. How can I do that?

By default, the TineMCE WYSIWYG editor shipped with Elxis, filters all JavaScript code when you press the Save or Apply button. So if you try to add JavaScript code that way, you will end up with a page with NO JavaScript!

What you can do?

Temporarily change your editor to No WYSIWYG.

How you can do that?
Go to Site -> General Settings and select "No WYSIWYG" as your editor.

Now edit again the item you want to add the JavaScript code. You will see the content in pure HTML code. Paste the JavaScript code and save.

Now it is time to switch back to TinyMCE. Go back to Site -> General Settings and select TinyMCE as your default editor.

WARNING. If you try to edit the content with JavaScript using the TineMCE, the JavaScript will be erased. You have been warned!