Associate
- Joined
- 20 Oct 2005
- Posts
- 112
Hi,
Can anyone offer advice on rules in TinyMCE? It keeps removing 'class' from image tags when we save a a document on our CMS.
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements
I'm using this as a guide. We've globally allowed class tags but tables and images wouldn't save classes. We've specified 'class' on each individual tag and now tables work, but images don't
Here are our valid elements
Can anyone see a problem in there?
Thanks
Can anyone offer advice on rules in TinyMCE? It keeps removing 'class' from image tags when we save a a document on our CMS.
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements
I'm using this as a guide. We've globally allowed class tags but tables and images wouldn't save classes. We've specified 'class' on each individual tag and now tables work, but images don't

Here are our valid elements
Code:
<![CDATA[@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],
strong/b,em/i,strike,u,#p[align],-ol[type|compact],-ul[type|compact],-li,br,img[class|longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,
-blockquote,-table[class|border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],
-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,
#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,
-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],
-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],
object[classid|width|height|codebase|*],param[name|value|_value],#embed[src|bgcolor|width|height|name|align|type|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,
button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],
input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],
kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],
q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big] ]]>
Can anyone see a problem in there?
Thanks
