I am creating a tinymce editor plugin that adds some microdata to the selected text and I want to make sure that the final markup will be valid. as specified in the draft microdata specification, a new item is indicated by adding the itemscope
attribute to the item, for example:
<section itemscope itemtype="http://example.com/vocab/someobject" itemid="someid" > <meta itemprop="topic" content="something very interesting" /> .... other microdata stuff </section>
I have extended tinymce configuration options for recognizing these microdata attributes:
tinyMCE.init({ ... schema: "html5", extended_valid_elements:"@[itemscope|itemtype|itemid|itemprop|content],div,span,time[datetime]" ... });
and everything works. however, when I use the plugin, tiny mce still "fixes" my markup by adding a null value to the itemscope attribute, for example: itemscope=""
. but the itemscope attribute is a boolean element, which AFAIU means it should not matter.
so the question is: a) is it still valid markup if the itemscope attribute matters? and b) if not, (how), can I configure tinymce to leave itemscope as the correct boolean attribute and not add the bit =""
?
thanks!
source share