- /**\r
- * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $\r
+/**\r
+ * attributes.js\r
*\r
- * @author Moxiecode - based on work by Andrew Tetlaw\r
- * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.\r
+ * Copyright 2009, Moxiecode Systems AB\r
+ * Released under LGPL License.\r
+ *\r
+ * License: http://tinymce.moxiecode.com/license\r
+ * Contributing: http://tinymce.moxiecode.com/contributing\r
*/\r
\r
function init() {\r
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