I was asked to enhance huge cmsms site with schema.org microdata. It was easy for all modules, because these tags are safe in templates. Problem starts when I need to add it to regular pages or global html blocks - when user switches to WYSIWYG, TinyMCE removes all non-standard attributes. I think I'm stuck, I can't force editors to use raw html code, I can't make hundreds of udt or html blocks also. Is there any solution I'm missing?
Any ideas would be appreciated.
TinyMCE clears all microdata when WYSIWYG is on
- opawaldburger
- Forum Members
- Posts: 94
- Joined: Tue Nov 04, 2008 2:10 pm
Re: TinyMCE clears all microdata when WYSIWYG is on
I can't give you a full instruction, since I don't really get how to do it. BUT there is a way to tell TinyMCE which elements are valid, and which aren't.
Look here: http://tinymce.moxiecode.com/wiki.php/C ... d_elements
Greetings,
Opa
Look here: http://tinymce.moxiecode.com/wiki.php/C ... d_elements
Greetings,
Opa
Re: TinyMCE clears all microdata when WYSIWYG is on
Try this
{literal} code {/literal}
I think this will work
{literal} code {/literal}
I think this will work
Re: TinyMCE clears all microdata when WYSIWYG is on
{literal} tags won't work, they are for smarty purposes.
Maybe you can use a second content block in your page template?
Maybe you can use a second content block in your page template?
Code: Select all
{content block="microdata" wysiwyg='false'}
- kidcardboard
- Forum Members
- Posts: 54
- Joined: Mon Sep 28, 2009 5:25 pm
Re: TinyMCE clears all microdata when WYSIWYG is on
If I'm not mistaken using "valid_elements" will kill all the default values and you'll have to redeclare everything. I think you want to use "extended_valid_elements" instead.
Under Extensions->TinyMCE WYSIWYG->Advanced there is a section called "Extra configuration".
add the following
Now you obviously replace "element" with whatever element you want to extend, and put a pipe (|) delimited list of whatever extra parameters/microdata you want to TinyMCE to keeps it's hands off of between the [ and ].
Unfortunately you'll have to list all the valid parameters for the element as it seems to replace the valid params instead of extend them. A full list of elements and their params can be found http://www.tinymce.com/wiki.php/Configu ... d_elements
Under Extensions->TinyMCE WYSIWYG->Advanced there is a section called "Extra configuration".
add the following
Code: Select all
extended_valid_elements : "element[width|height|itemscope|itemtype|itemprop]"
Unfortunately you'll have to list all the valid parameters for the element as it seems to replace the valid params instead of extend them. A full list of elements and their params can be found http://www.tinymce.com/wiki.php/Configu ... d_elements