(Solved) HTML5 code in TinyMCE editor

Permalink 1 user found helpful
Hi
I've created a theme which is fully based on html5. So I want users should be able to add html5 tags through TinyMCE editor. I was trying to do so but not succeeded. Is there any way to do that. Every time I have added the html5 tag, it just removed automatically.

Could someone shade some light on it.

Rony

ronyDdeveloper
 
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Bump!
mesuva replied on at Permalink Reply
mesuva
What HTML5 element(s) are you wanting to support in TinyMCE?

I really can't think of an html5 tag that wouldn't be better off handled by the theme or a custom block.
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Suppose I want to add <section> tag through content block. But I cannot. Sometime its not possible to add it through themes. So I like to add it through Content blocks but I can't. Editor just omit the tags while adding or editing.

Is there a way to stop editor to do that.

Rony
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
Here is the post that solves my problem.
http://www.concrete5.org/community/forums/customizing_c5/html5-and-...

It solves my problem. Great... After a long search, I found that post.

Rony
mesuva replied on at Permalink Reply
mesuva
Glad to hear you've found a solution.

I personally wouldn't look to manage sections within TinyMCE, as they're effectively invisible elements and they'd be hard to select, close, adjust, etc.

I either see sections as something that should be either handled in the template (with multiple editable areas) if you are talking about broader document sections, or if you wanting to creating smaller document sections I'd handle this with a custom block template for the content block.

I'd create for the content block a custom template called 'wrap with section', and have something like:

<?php 
defined('C5_EXECUTE') or die("Access Denied.");
$content = $controller->getContent();
print '<section>';   
print $content;
print '</section>';   
?>


Then you can simply pick for your block this template and it marks it up as being in a section. It still could get a bit messy, but I reckon this would be easier to manage than the tag in TinyMCE. Perhaps it's just my style of development!
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Yes you are right but whats about other tags like <small>, <blockquotes>, <time> etc.

Rony
mesuva replied on at Permalink Reply
mesuva
I'd say small is fine, it's kind of like marking up a paragraph, but saying it's more of a 'side comment', or 'the fine print' (from what I've read). I wouldn't use it for visually styling something smaller.

Blockquotes are similar in paragraphs too. I thought that's already supported.

The Time element I'd be hesitant to include, as it's more to do with microformats and syndicated content. It's about marking up a human readable time/date, but including as an attribute a machine readable time format. So to me this is a tag that would be more likely spit out programatically in a blog list (a page list block really), rather than something you'd mark up manually in content. As soon as you start dealing with dates, I see that as more structured information that you wouldn't want to manually format up with a content block.