Friday, November 4, 2011

How add Javascript in Joomla article easily

Wondering to add Javascript snippet in Joomla article. Here is the easiest way to add.
Goto Joomla Administrator -> site -> Global Configuration.
Select Editor - TinyMCE 2.0 as Default WYSIWYG Editor & save it.
that's it you are now free to write javascript code in articles.
Don't try to change above setting otherwise you will lose Javascript code from joomla article. It worked for me with Joomla 1.5 version.

Somewhere i read following lines but it won't help me at all cause it adds extra tags like mce_href & it changed the code according to it's structure which is nonsense(but it just make sure that your JS code wont lose if you change above settings).
Go to plugin manager & click on tiny TinyMCE 2.0
Go to plugin parameters
select "never" to Code cleanup on save option & save it.

I suggest use this method only when there is no preference to use editor other than TinyMCE. Otherwise you need to find a plugin from joomla extensions.

6 comments:

  1. Thanks for posting this. i really had good time reading this.
    joomla extension

    ReplyDelete
  2. Great article.I like your thoughts and it's really great.Great discussion.Thanks for sharing.

    Joomla developer

    ReplyDelete
  3. Replies
    1. Great, thanks to share a article that included whatever required a user.

      joomla developer

      Delete
  4. poor! not working in my case :(

    ReplyDelete
    Replies
    1. What exactly you want to do..? can you please let me know little more

      Delete