X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Ftiny_mce%2Fplugins%2Fxhtmlxtras%2Fjs%2Fattributes.js;h=9c99995adb90306124d406cad6e78e310459acdd;hb=b05f4eef4014db3885787ef15107cba93c932ac9;hp=23c7fa4c277c3fb52c8bb9076c825476ac714b03;hpb=d2e69f5f0bf088b1137aad70ed4a571fd9bde577;p=citadel.git diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js index 23c7fa4c2..9c99995ad 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * attributes.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { @@ -50,7 +53,6 @@ function insertAction() { var inst = tinyMCEPopup.editor; var elm = inst.selection.getNode(); - tinyMCEPopup.execCommand("mceBeginUndoLevel"); setAllAttribs(elm); tinyMCEPopup.execCommand("mceEndUndoLevel"); tinyMCEPopup.close(); @@ -69,21 +71,7 @@ function setAttrib(elm, attrib, value) { value = valueElm.value; } - if (value != "") { - dom.setAttrib(elm, attrib.toLowerCase(), value); - - if (attrib == "style") - attrib = "style.cssText"; - - if (attrib.substring(0, 2) == 'on') - value = 'return true;' + value; - - if (attrib == "class") - attrib = "className"; - - elm[attrib]=value; - } else - elm.removeAttribute(attrib); + dom.setAttrib(elm, attrib.toLowerCase(), value); } function setAllAttribs(elm) {