2. Using Liferay
(Opens New Window)
Mark as an Answer
How can I stop the Web Content WYSIWYG Editor from messing up my html?
January 22, 2013 6:45 AM
Rank: New Member
Join Date: December 14, 2012
My problem is the following. I want to use an area as an anchor.
<img src="some_image" />
The <a> tag is around a div whichs technically isn't valid in Html4 but in 5 it is. But the browsers get it so I want to use it.
How ever whenever I edit the webcontent the WYSIWYG editor is opened firtst and it has this nasty habit of changing the html as he wants.
the above code gets corrected to the following
<a href="http://google.com"> </a></p>
<a href="http://google.com"><img src="some_image" /> </a>
<a href="http://google.com">some heading</a></h1>
<a href="http://google.com">some text</a></p>
The <a> tag got mulitplied by 4 and now the text and headings have hover effects which I don't want. You see where I'm getting.
Can I somehow tell the WSIWYG editor to stop this behaviour?
Sign in to vote.
Please sign in to flag this as inappropriate.