WYSIWYG removing empty tags
We have a section on our site that has social media links that are icons only. The code is a classed unordered list with links, but no content in the links. The icons are loaded and manipulated (i.e. rollovers) from CSS. However, with the latest update to Cascade 7.8.3, the WYSIWYG editor automatically removes the whole structure.
Here is the structure in question:
<div id="social">
<ul>
<li class="facebook">
<a href="http://www.facebook.com/BelmontUniversity" target="_blank" title="Belmont on Facebook"></a>
</li>
<li class="twitter">
<a href="http://twitter.com/BelmontUniv" target="_blank" title="Belmont on Twitter"></a>
</li>
<li class="youtube">
<a href="http://www.youtube.com/user/BelmontU" target="_blank" title="Belmont's YouTube channel"></a>
</li>
<li class="smugmug">
<a href="http://belmontphoto.smugmug.com/" target="_blank" title="Belmont Smugmug gallery"></a>
</li>
</ul>
</div>
After opening with the editor all that is left is:
<div id="social"></div>
TidyHTML is turned off, but even turning it back on doesn't change anything.
Thanks,
Byron Marsh
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 25 Jun, 2014 04:45 PM
Hi Byron,
This definitely looks to be a problem with TinyMCE and not Cascade Server, because I was able to reproduce this behavior on TinyMCE's demos (even with their latest version, 4.1). The issue is when updating the source code, the empty list is being removed completely.
I'm not sure if this is acceptable, but I noticed the HTML remains if if you add a space within the links.
Also, depending on how you are applying this content to the page, you could either try surrounding the content with
#protect
code sections, or switch over to using an XML Block instead, which does not use TinyMCE.Please let me know if you have any questions.
Thanks!
2 Posted by Ryan Griffith on 01 Jul, 2014 08:12 PM
Hi Byron,
Just wanted to follow up to see if you had a chance to view my recent comment.
Another possible suggestion would be to switch over to using XML Blocks. Because these Blocks do not use TinyMCE, the HTML should be left alone (assuming it is valid XML).
Please let us know if you have any questions.
Thanks.
3 Posted by byron.marsh on 02 Jul, 2014 01:47 PM
Ryan,
Yes, I figured it had to be something with TinyMCE as I have the TidyHTML turned off. The code would be there until I opened it in the editor. I had already worked around it with a Text block. The protect code section doesn't really work because it doesn't show up in the preview so you can't see your changes. Of course, I may have implemented that incorrectly.
Is there any way to turn that "feature" off in TinyMCE?
Thanks,
Byron Marsh
________________________________
Support Staff 4 Posted by Tim on 02 Jul, 2014 01:53 PM
Hi Byron,
Ryan is out of the office for the remainder of the week so I figured I'd follow up here. Unfortunately it's not possible to disable that behavior in TinyMCE apart from making changes directly to the TinyMCE javascript file (which would not be supported). We do have this idea on our Idea Exchange which I would encourage you to vote on. It is one of our top rated ideas on the exchange already, so it's certainly something that is on our radar.
Let me know if you have any further questions.
Thanks!
Ryan Griffith closed this discussion on 09 Jul, 2014 03:00 PM.