Hi, I'm trying to get TinyMCE to let the user enter onclick properties through the CMS, for forms. I've had to add the form to the allowed elements in "cms/javascript/tinymce.template.js" and my line 43/44 reads:
valid_elements : "+a[id|rel|rev|dir|tabindex|accesskey|type|name|href|target|title|class],-strong/-b[class],-em/-i[class],-strike[class],-u[class],#p[id|dir|class|align],-ol[class],-ul[class],-li[class],br,img[id|dir|longdesc|usemap|class|src|border|alt=|title|width|height|align],-sub[class],-sup[class],-blockquote[dir|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|dir|id|style],-tr[id|dir|class|rowspan|width|height|align|valign|bgcolor|background|bordercolor|style],tbody[id|class|style],thead[id|class|style],tfoot[id|class|style],-td[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],-th[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],caption[id|dir|class],-div[id|dir|class|align],-span[class|align],-pre[class|align],address[class|align],-h1[id|dir|class|align],-h2[id|dir|class|align],-h3[id|dir|class|align],-h4[id|dir|class|align],-h5[id|dir|class|align],-h6[id|dir|class|align],hr[class],dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],iframe[src|height|width|frameborder],form[id],input[type|id|onclick|value]",
extended_valid_elements : "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],input[type|id|onclick|value]"
I can tell it to allow *{*} but that still doesn't stop it eating the onclick :/ (NOTE: Used {} for here as the forum doesn't escape square brackets properly)
Even with the "form[id],input[type|id|onclick|value]" at the end, it's not letting me put onclick events on to the input elements:
<p><input type="button" value="Calculate" onclick="getBuyToLet();" /></p>
becomes
<p><input type="button" value="Calculate" /></p>
Does anyone have any ideas why? This is fairly urgent.
Thanks.