TinyMCE config for HTML5 in Concrete 5.5

Permalink
I'm loving Concrete 5.5 - well done all involved! I have one tiny issue using HTML5 within TinyMCE...

Some of the footer links on the site I'm building use multiple elements nested within <a> tag links like this (perfectly valid HTML5):

<a class="footBespoke" href="/bespoke/">
<h5>header text</h5>
<p>some text here</p>
</a>


Trouble is, TinyMCE strips the surrounding <a> tags as it considers them invalid (as was the case in HTML 4.01). My workaround has been to go to Dashboard > System and Settings > Basics > Rich Text Editor. Choose Custom editor and add the line:
verify_html: "false"

This stops the <a> tags being stripped but leaves the editor without a toolbar and the styling is all screwed up (no buttons showing for 'save' etc) - I can use it but it's not good for use by the client when I hand it over...

So instead, to solve this I have tried editing blocks/content/editor-config.php and adding:

verify_html: false,
   valid_children : "+a[div|h1|h2|h3|h4|h5|h6|p|#text]",


At lines 19 and 20 but for some reason, it doesn't seem to effect anything. Does anyone know why?

Is there any way to keep the simple looking editor but add support for the nested elements within <a> tags?

benfrainuk
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Hi Ben.
I don't have an answer for you. But I do want to say that I don't think that is valid HTML (not even HTML5). <a> tags are inline elements, while <h5> and <p> are block-level elements, and as far as I know you can't have block-level elements inside inline elements. This is why TinyMCE is messing with your code.

All that being said, just because it's not valid doesn't mean it won't work in the real world, so I hope there is a solution out there -- but I don't think you're going to find it here in the C5 forums -- instead I'd try whatever TinyMCE forums are out there.

Best of luck.

-Jordan
benfrainuk replied on at Permalink Reply
benfrainuk
Hi Jordan,

Trust me, that is valid HTML5 - in fact don't trust me, you can check out the relevant part of the W3C spec here:http://dev.w3.org/html5/spec/Overview.html#the-a-element...

Here's a quote of the relevant part, "The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g. buttons or other links)".

Just wondered if anyone else had already cracked getting it to work within the TinyMCE as it's going to be used increasingly...
jordanlev replied on at Permalink Reply
jordanlev
Well whaddya know... I learn something new every day!
Thanks for the update. Wish I could help with the TinyMCE issue.

-Jordan
Phallanx replied on at Permalink Reply
Phallanx
benfrainuk replied on at Permalink Reply
benfrainuk
Hi, don't think so as I'm trying to control what elements live within another (eg h5 and p within an a element). Here's the relevant detail:http://www.tinymce.com/wiki.php/Configuration:valid_children...
Phallanx replied on at Permalink Reply
Phallanx
Well. That's about my limit of understanding with TinyMCE. Sorry I couldn't be much more help.

Let us know if you find the solution.
ionoarmandino replied on at Permalink Reply
Did you ever find a solution for this? I am in the same boat and I really need to get this working.

Im Using WPMU 4.1