var inst = tinyMCEPopup.editor;\r
var elm = inst.selection.getNode();\r
\r
- tinyMCEPopup.execCommand("mceBeginUndoLevel"); \r
setAllAttribs(elm);\r
tinyMCEPopup.execCommand("mceEndUndoLevel");\r
tinyMCEPopup.close();\r
value = valueElm.value;\r
}\r
\r
- if (value != "") {\r
- dom.setAttrib(elm, attrib.toLowerCase(), value);\r
-\r
- if (attrib == "style")\r
- attrib = "style.cssText";\r
-\r
- if (attrib.substring(0, 2) == 'on')\r
- value = 'return true;' + value;\r
-\r
- if (attrib == "class")\r
- attrib = "className";\r
-\r
- elm[attrib]=value;\r
- } else\r
- elm.removeAttribute(attrib);\r
+ dom.setAttrib(elm, attrib.toLowerCase(), value);\r
}\r
\r
function setAllAttribs(elm) {\r