Showing Html With Joomla?!!?
March 1, 2010 under FAQ
Well I’m creating my website (http://sowhatdesigns.com)
and I want people to be able to copy HTML code so they can put it on their own pages. Everytime I try to put the HTML code in a textarea or whatever, Joomla reads it as actual HTML which isn’t what I want. I want the HTML to show up for the users to see and copy. How do I do this?! HELP!!!
Search more about Showing Html With Joomla?!!?:




you can add CSS style to it as always, simply by adding
To expand upon the other answers…
The code tag is “symantically correct”. Formatting continues to work within the tag, so if, for example, you want to embolden parts of the code, you can use the usual “b” tag, etc. You must escape all your less-thans and greater-thans, etc. with entities (but the WYSIWYG editor will do this for you).
You may want to force the style for your code to include “font-family: monospace” and “white-space: pre” and not leave it to various browsers to decide how to display.
You may get away with not escaping some HTML within a textarea (which is really a form input), but you should anyway. If you do decide to use textarea, you will probably want to include rows, cols, and readonly attributes.
put it in a non text area! :P
Anyways you could enable Joomlas WSYWIG editor (what you see is what you get)and then write your code.
If you use basic editor it makes the code as part of your website basicly.
or you could put the code in a code area i think it was
(html) or [code](wsywig)