RoyalEnfy
RoyalEnfy

Reputation: 127

How to insert HTML/javascript/css code in joomla article

I am using Joomla 1.5. and I am writing a blog in joomla and want to highlight some HTML and javascript code but when I save that article after inserting the HTML code as it is, it gets exicuted itself. I also tried it with codecitation plugin but no result. If you people have any solution then please reply.

Upvotes: 3

Views: 1677

Answers (5)

Olasunkanmi
Olasunkanmi

Reputation: 972

Sorry for coming late to the party. I used an extension called Easy Script. Just download, install and paste your script in your article manager and Boom. It even supports Bootstraps and other scripts as well.. Just give is a trial

Easy Script

Upvotes: 0

SMacFadyen
SMacFadyen

Reputation: 3165

Use the a jQuery highlighter.

Upvotes: 0

Flor
Flor

Reputation: 111

You can use <pre> and <code> tags. Also Joomla has a native plugin to display code and syntax highlighting, based on the Geshi project. It's easy to use, just be sure it is enabled in your plugins config:

<pre lang="html" >
<p> some text </p>
</pre >

Hope it helps!

Upvotes: 0

Sara
Sara

Reputation: 14628

Use a <pre> tag it should work. e.g.

<pre>&lt;html&gt;&lt;\html&gt;</pre>

Upvotes: 1

gprathour
gprathour

Reputation: 15333

In your blog try "& lt;" (without space) to write < and "& gt;" (without space) to write > in your HTML Code.

This syntax is used to write "<" and ">" symbols on some web page. Otherwise it will treat your code as part of the blog article and will show its output.

Upvotes: 0

Related Questions