Editing HTML in a Joomla Module or Article

Tagged in joomla 1.5joomla 1.0
 

There are lots of times you might want to work in raw HTML in a Joomla article or module. For example, embedding Google maps, or maybe using a widget in a module like Feedburner.

Unfortunately, sometimes the editor screen you are using will strip out the HTML code, or cause an error. Rather than having to turn the editor on/off in global configuration, there is an easier way. 

Try this trick.

Make a super administrator, I call him "noeditorguy". and then find him in the user manager and change his editor to "No Editor".

Any time I need to work in raw html, I log in with this user, front end or back end.

This also works for articles too.

Note, if you are showing authors on the front end article, you'll either have to create the article with the user you want to be author first, or override the author in the parameters of that article.

Even Easier

Get an advanced editor like WsywiygPro, it allows you to flip to the source code and back and does not cause code errors. 

Trackback(0)
Comments (20)add comment

Michelle Myers said:

...
Great tip! I have found myself going to global config so many times thinking there should be a better way! smilies/grin.gif

Copes Flavio said:

...
Nice tip! When such a thing happened (not often) I used to edit my content in phpmyadmin but this is a much clever way to work smilies/cheesy.gif

daniel said:

...
I spent 2 hours trying to fix bugs in the various gmail calendar apps for joomla before I read this and had it online in two minutes. Thanks!

Nick Kotarski said:

...
It is a good tip but I don't find it that hard to go to user manager and select "No Editor/No WYSIWYG Editor" for the user that I am using.
No need to go anywhere near Global Configuration at all.
It's 4 clicks in 1.5 and 1.0.

Nick

Administrator said:

...
@Nick,
Yes, what I was trying to explain is that you just make a user with no editor set, and then log in as him when you need to mess in raw html.

Bob Timms said:

...
When I try to escape an "&" with "&" it strips it out and reverts to "&". Is there anyway around this?

Bob Timms said:

...
It even does it in the this message board in my previous post. I'll try again with additional spaces. Escape an "&" with "& a m p ;".

Administrator said:

...
@Bob
Are you talking about these comments or your own site?

Bob Timms said:

...
My own sites. I understand why they are stripped from the message board. It seems that when I escape the "&"s in the editor and do an "apply" they are done as expected on the actual html page but are then stripped out of the editor after the "apply". The only way I can see to work with this issue is do the escapes only on the final edit as it waste too much time to escape them on each save when you're tweaking a page.

Guy R Cook said:

...
I like that idea, simple, easy to employ and a great way to work around the wysiwyg issues that occur. Thanks for sharing.

Administrator said:

...
@Bob
If you have no editor set as I described in the blog... I am a bit stuck smilies/sad.gif

Bob Timms said:

...
I am working totally with the no editor option. So are you able to use the ampersand escape (& a m p smilies/wink.gifwithout the editor stripping it?

Nick Kotarski said:

...
@Barrie

I completly understand what you are saying. It's just that I find it easier to just turn wysiwyg editing off for the user that I am using. Just a matter of taste.

@Bob

If you are working without a wysiwyg editor nothing should touch the code as it is saved. That is the whole point of the no wysiwyg editor setting. And yes you can insert an escaped ampersand and have it preserved.

Nick

Marie Whitehead said:

...
And I have been wondering why I was having a problem with widgets I want to try. I assumed that if I clicked on the HTML button in my editor and inserted the code all should work. But it didn't. As I don't write code I had no clue as to what was happening. Can't wait to try this tip out.

Marie

Paul said:

...
I am working on an installation of version 1.0 for a site. I have menu items that have various text links but I need to convert some of those into click able images/buttons. I assume I need to edit the corresponding module to do this. However, even by following your example, I can't seem to access the HTML section of the components. Or is there a different way I should be approaching this? Please help...

Administrator said:

...
@Paul
Try this: Make a basic menu in Joomla with the links you need. View the source of the frontend. Past the menu part into a text editor (or dreamweaver). Then you can modify the HTML/CSS to get the menu effects you need and paste it into a custom HTML module.

Thomas A Frazee said:

...
I'm trying to take the log in module on the front page and make it log into a database provider called Memberclicks. I've got all the code for their log in creds, but i'm not sure where to go in the module to make it work. Any ideas?

Jeff said:

...
Hi,
I have a dating site named www.date-docs.com and I am trying to make a custom html module that will show up in the middle of the page. I tried manipulating the modules and the template positions but it did not work. can anyone help me?

Jeff said:

...
IT WORKS,like a glove, I have been looking for this for days !
Thanks a lot ! This is great ! :0

Peter D said:

...
I am dying here. I have no editor turned on and its still stripping an image map and all html after I apply or save in Joomla 1.5

Are you guys using 1.5.6?

Write comment

busy