Hi guys,
Upgrading CKeditor is sometimes really a pain, unless I might use your editor in a manner that you don't expect, I think you guys should do more unit tests.
Anyway. I have some data processor that keep the editor from breaking html emails, and they are currently broken with 3.5, but work fine with 3.4.3
Upgrading CKeditor is sometimes really a pain, unless I might use your editor in a manner that you don't expect, I think you guys should do more unit tests.
Anyway. I have some data processor that keep the editor from breaking html emails, and they are currently broken with 3.5, but work fine with 3.4.3
if(typeof oEditor != "undefined" && typeof oEditor.dataProcessor != "undefined"){ oEditor.dataProcessor.htmlFilter.addRules({ elements :{ img : function( element ){ if(!element.attributes.width){ if(element.attributes.style){ var styling = element.attributes.style + ";display:none;"; var sWidth = $("#regexx").attr("style", styling).css("width") if(sWidth != "0px" && sWidth) element.attributes.width = sWidth; } } if(!element.attributes.height){ if(element.attributes.style){ var styling = element.attributes.style + " ;display:none;"; var sHeight = $("#regexx").attr("style", styling).css("height") if(sHeight != "0px" && sHeight){ element.attributes.height = sHeight; } } } }, $: function(element){ if(element.attributes.style){ var styling = element.attributes.style; var temp = styling + ";display:none;" var sColor = "color:" + $("#regexx").attr("style", temp).css("color"); var sColor=styling.match(/color\:\s{0,}rgb\(([0-9]+),\s{0,}([0-9]+),\s{0,}([0-9]+)\)\;/i); if(sColor){ var getHex = RGBtoHex(sColor[1],sColor[2],sColor[3]); getHex = "color: #" + getHex + "; " var color = styling.replace(sColor[0], getHex); element.attributes.style = color; } } } } }); }
Re: 3.5 dataprocessor are broken
@karnius: please report bugs here: http://dev.ckeditor.com and provide as much information as possible. Including the extact error message or detailed description of a problem and as much simplified example as possible.
(pls make sure it's not a cache issue)
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+