+ value = value.replace(/]*margin-left[^>]*>([^\n|\n\015|\015\n]*)<\/p>/ig,"
"); + + // replace VML pixel image references with image tags - experimental + value = value.replace(/<[a-z0-9]+:imagedata[^>]+src="?([^> "]+)"?[^>]*>/ig,""); + + // Word comments + value = value.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), ""); + + // kill class=mso??? and on mouse* tags + value = value.replace(/([ \f\r\t\n\'\"])class=mso[a-z0-9]+[^ >]+/ig, "$1"); + value = value.replace(/([ \f\r\t\n\'\"]class=")mso[a-z0-9]+[^ ">]+ /ig, "$1"); + value = value.replace(/([ \f\r\t\n\'\"])class="mso[a-z0-9]+[^">]+"/ig, "$1"); + value = value.replace(/([ \f\r\t\n\'\"])on[a-z]+=[^ >]+/ig, "$1"); + value = value.replace(/ >/ig, ">"); + + // remove everything that's in a closing tag + value = value.replace(/<(\/[A-Za-z0-9]+)[ \f\r\t\n]+[^>]*>/ig,"<$1>"); + } + + if(type == 'get_from_editor_dom') { + var allImages =value.getElementsByTagName('img'); + var i,img; + + for(i=0;img=allImages[i];i++) { + img.onresizestart = null; + img.onresizeend = null; + img.removeAttribute('onresizestart'); + img.removeAttribute('onresizeend'); + } + + var allDLs =value.getElementsByTagName('img'); + for(i=0;img=allDLs[i];i++) { + if(img.className.match(/(^|\b)specialImage($|\b)/)) { + img.onresizestart = null; + img.onresizeend = null; + img.removeAttribute('onresizestart'); + img.removeAttribute('onresizeend'); + } + } + + } + return value; +} + +contentPanelCloseButton = Class.create(); +contentPanelCloseButton.prototype = { + onclick: function() { + tinyMCE.activeEditor.execCommand('ssclosesidepanel'); + } +} + +contentPanelCloseButton.applyTo('#contentPanel h2 img'); +$1