X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=plugins%2Ffakeobjects%2Fplugin.js;h=5da98a1fd333d7b49764cfed380f33d4b1be5cc5;hb=HEAD;hp=475044a221d6183e71c62ce2f3ca2d4ad51fdd5a;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/plugins/fakeobjects/plugin.js b/plugins/fakeobjects/plugin.js deleted file mode 100644 index 475044a..0000000 --- a/plugins/fakeobjects/plugin.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function(){var a={elements:{$:function(b){var c=b.attributes._cke_realelement,d=c&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(c)),e=d&&d.children[0];if(e){var f=b.attributes.style;if(f){var g=/(?:^|\s)width\s*:\s*(\d+)/.exec(f),h=g&&g[1];g=/(?:^|\s)height\s*:\s*(\d+)/.exec(f);var i=g&&g[1];if(h)e.attributes.width=h;if(i)e.attributes.height=i;}}return e;}}};CKEDITOR.plugins.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(b){var c=b.dataProcessor,d=c&&c.htmlFilter;if(d)d.addRules(a);}});})();CKEDITOR.editor.prototype.createFakeElement=function(a,b,c,d){var e=this.lang.fakeobjects,f={'class':b,src:CKEDITOR.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(a.getOuterHtml()),alt:e[c]||e.unknown};if(c)f._cke_real_element_type=c;if(d)f._cke_resizable=d;return this.document.createElement('img',{attributes:f});};CKEDITOR.editor.prototype.createFakeParserElement=function(a,b,c,d){var e=new CKEDITOR.htmlParser.basicWriter();a.writeHtml(e);var f=e.getHtml(),g=this.lang.fakeobjects,h={'class':b,src:CKEDITOR.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(f),alt:g[c]||g.unknown};if(c)h._cke_real_element_type=c;if(d)h._cke_resizable=d;return new CKEDITOR.htmlParser.element('img',h);};CKEDITOR.editor.prototype.restoreRealElement=function(a){var b=decodeURIComponent(a.getAttribute('_cke_realelement'));return CKEDITOR.dom.element.createFromHtml(b,this.document);};