As an example, adding <span class="myClass"> in the html editor works as expected. However, if I make an edit like:
<span class="myClass" id="myID">
..clicking update seemingly works as no erros are thrown when the html view closes, but upon re-opening the editor the code reverst back to:
<span class="myClass">
In one partcularly frustrating scenario case I am unable to add a call to a javscript function as onmouseover="myFunction()" is removed on every attempt to add it...
I have only used v4+ of Umbraco, but this sounds like a TinyMCE problem - Have you tried updating the version of TinyMCE you have installed with that version of Umbraco?
did you have a look at your tinyMceConfig.config file in the umbraco config folder? You can specify which attributes are allowed on an html Tag.
Locate the Tag validElements and look for -span[class|align] and change this to -span[class|align|id]. This will prevent the tinyMce from tidying up your id attribute.
attributes removed by editor
Howdy,
As an example, adding <span class="myClass"> in the html editor works as expected. However, if I make an edit like:
<span class="myClass" id="myID">
..clicking update seemingly works as no erros are thrown when the html view closes, but upon re-opening the editor the code reverst back to:
<span class="myClass">
In one partcularly frustrating scenario case I am unable to add a call to a javscript function as onmouseover="myFunction()" is removed on every attempt to add it...
(version 3.3, using both FF3 and IE8)
I have only used v4+ of Umbraco, but this sounds like a TinyMCE problem - Have you tried updating the version of TinyMCE you have installed with that version of Umbraco?
If you need to add a class in the editor you need to make a specific stylesheet with a set of styles, which makes it possible for you to set classes.
You can read more about that here: http://our.umbraco.org/wiki/how-tos/customizing-the-wysiwyg-rich-text-editor-%28tinymce%29
/Jan
Hi,
did you have a look at your tinyMceConfig.config file in the umbraco config folder? You can specify which attributes are allowed on an html Tag.
Locate the Tag validElements and look for -span[class|align] and change this to -span[class|align|id]. This will prevent the tinyMce from tidying up your id attribute.
Hope this helps
Toby
Bingo! The problem was as you stated Tobias - I updated tinyMce config and now working as expected.
Thanks to all for the responses provided, much appreciated.
is working on a reply...