Upgrade TinyMCE to v3.4.5
[citadel.git] / webcit / tiny_mce / plugins / xhtmlxtras / js / attributes.js
index d62a219e6b255af55e402373e3618cf4a0ebeee6..9c99995adb90306124d406cad6e78e310459acdd 100644 (file)
@@ -53,7 +53,6 @@ function insertAction() {
        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
@@ -72,21 +71,7 @@ function setAttrib(elm, attrib, value) {
                        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