So I've seen all the posts about what to do when attributes are being stripped by TinyMCE, but I'm still seeing onmouseover being stripped on <img> tags. Onmouseout and other attributes aren't being stripped on the <img> tag, just onmouseover.
First off...there might be something that you have missed above. Honestly I have only skimmed it since what I really would like to know is what it is you're trying to achieve?
I suppose you're about to make some image switching or something using JavaScript on mouseover or something. But I would like to hear a bit more about it since I don't think relying on data from the RTE field is neccesarily the best option.
So if you don't mind describing what you're trying to achieve I would rather give you some advice on how to make a better solution (If there is one of course).
My company is no longer supporting our homegrown cms system and chose umbraco as its new cms. In our own cms we used TinyMCE as well, but pretty much unrestricted so users could do their own hover images on content via the advanced tab of the insert/edit image. We had open content areas that were flexible to what content was allowed, everything was using TinyMCE to enter in content and images.
So we've have sites that have this already being used and will need to move to umbraco. I used this http://forum.umbraco.org/yaf_postst8163_TinyMCE--insert-image-dialog.aspx (Arjandb's post) to add a way to set the hover image. I was trying to add a class to the image and have a jquery .hover function to do the image hovers on images with said class, but am not having any luck with that either.
Ok, that makes sense. However I will never recommend doing logic in a rich text editor.
But I'm a bit puzzled that it seems like the HTML is still being cleaned since you have disabled TidyEditorContent...did you touch the web.config or restart the app pool after doing this?
onmouseover being stripped from img tag only
So I've seen all the posts about what to do when attributes are being stripped by TinyMCE, but I'm still seeing onmouseover being stripped on <img> tags. Onmouseout and other attributes aren't being stripped on the <img> tag, just onmouseover.
My img section in <validElements>:
img[align<bottom?left?middle?right?top|alt|border|class|dir<ltr?rtl|height |hspace|id|ismap<ismap|lang|longdesc|name|onclick|ondblclick|onkeydown |onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover |onmouseup|src|style|title|usemap|vspace|width]
umbracoSettings.config changes:
<TidyEditorContent>False</TidyEditorContent>
<allowedAttributes>align,alt,border,class,dir,height,hspace,id,ismap,lang,longdesc,name,onclick,ondblclick,onkeydown,onkeypress,onkeyup,onmousedown,onmousemove,onmouseout,onmouseover,onmouseup,src,style,title,usemap,vspace,width</allowedAttributes>
Is there something else that I'm missing that is causing the onmouseover to be stripped?
Hi Jesse and welcome to our :)
First off...there might be something that you have missed above. Honestly I have only skimmed it since what I really would like to know is what it is you're trying to achieve?
I suppose you're about to make some image switching or something using JavaScript on mouseover or something. But I would like to hear a bit more about it since I don't think relying on data from the RTE field is neccesarily the best option.
So if you don't mind describing what you're trying to achieve I would rather give you some advice on how to make a better solution (If there is one of course).
Looking forward to hearing from you.
/Jan
My company is no longer supporting our homegrown cms system and chose umbraco as its new cms. In our own cms we used TinyMCE as well, but pretty much unrestricted so users could do their own hover images on content via the advanced tab of the insert/edit image. We had open content areas that were flexible to what content was allowed, everything was using TinyMCE to enter in content and images.
So we've have sites that have this already being used and will need to move to umbraco. I used this http://forum.umbraco.org/yaf_postst8163_TinyMCE--insert-image-dialog.aspx (Arjandb's post) to add a way to set the hover image. I was trying to add a class to the image and have a jquery .hover function to do the image hovers on images with said class, but am not having any luck with that either.
Hi Jesse
Ok, that makes sense. However I will never recommend doing logic in a rich text editor.
But I'm a bit puzzled that it seems like the HTML is still being cleaned since you have disabled TidyEditorContent...did you touch the web.config or restart the app pool after doing this?
What version of Umbraco are you using?
/Jan
Yes I have reset the app pool. That's what is really bothering me about it still removing code.
I'm using umbraco v 4.10.1 (Assembly version: 1.0.4701.29088.
is working on a reply...