X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fiframe%2Fplugin.js;h=23fb764e97c6aafb2d2a63efcd368a2a361e5f14;hb=2f22c0c38f17e75be5541089076885442aaa2377;hp=f4742b95d7cb014babf6e7d0dd69b5dc2e9e0c9e;hpb=9afde8772159bd3436f1f5b7862960307710ae5a;p=ckeditor.git diff --git a/_source/plugins/iframe/plugin.js b/_source/plugins/iframe/plugin.js index f4742b9..23fb764 100644 --- a/_source/plugins/iframe/plugin.js +++ b/_source/plugins/iframe/plugin.js @@ -1,29 +1,10 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { - function createFakeElement( editor, realElement ) - { - var fakeElement = editor.createFakeParserElement( realElement, 'cke_iframe', 'iframe', true ), - fakeStyle = fakeElement.attributes.style || ''; - - var width = realElement.attributes.width, - height = realElement.attributes.height; - - if ( typeof width != 'undefined' ) - fakeStyle += 'width:' + CKEDITOR.tools.cssLength( width ) + ';'; - - if ( typeof height != 'undefined' ) - fakeStyle += 'height:' + CKEDITOR.tools.cssLength( height ) + ';'; - - fakeElement.attributes.style = fakeStyle; - - return fakeElement; - } - CKEDITOR.plugins.add( 'iframe', { requires : [ 'dialog', 'fakeobjects' ], @@ -96,7 +77,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { iframe : function( element ) { - return createFakeElement( editor, element ); + return editor.createFakeParserElement( element, 'cke_iframe', 'iframe', true ); } } });