Home Joomla Tips Easiest Way to Place Javascript, CSS and PHP Code in Joomla Content
Author:

When writing article in Joomla CMS we normal normally use WYSIWYG editor such as TinyMCE. However this type of editor prevents us from inserting Javascript code or CSS into the content. When an article is saved the Javascript code get strip out and replace with normal text.

Sometimes we would like to put the Javascript in an article content to perform some actions or to do a demo then the easiest way to do so is to use a plugin. There is a plugin called Sourcerer which is compatible with Joomla 1.5, 1.6 and 1.7 at the time of this writing.

Sourcerer enables you to place PHP and any kind of HTML style code (including CSS and JavaScript) right into article content. But not only in articles, but also in sections, categories, modules, components, META tags, etc.

You can download the plugin here.

To install it:

1. Simply download it down to your computer.

2. Then log into Joomla administrator panel with your username and password.

3. Next select from the menu Extension > Install/Uninstall.

4. Then from the Upload Package File select the Sourcerer plugin and click on Upload File & Install button.

5. Next select Extensions > Plugin Manger.

6. Select the installed component and set the require paremeter.

sourcerer-extension-setting

7. Now when you write an article, at the bottom of the editor you will see an additional Insert Code <> button which you could use to insert Javascript, CSS or PHP code.

sourcerer-extension-button

The editor is quiet easy to use and you can place Javascript code in your article content in no time.

Did you like this tip?



Comments (0)
Write comment
Your Contact Details:
Comment:
Security
Please input the anti-spam code that you can read in the image.

"