X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fflash%2Fplugin.js;h=97f8a1242d98f1c18071e94b5e516c119b0aa0ab;hb=f0610347140239143439a511ee2bd48cb784f470;hp=5dda730fdb502fdda9cb9175bfc64752cd3e8166;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/plugins/flash/plugin.js b/_source/plugins/flash/plugin.js index 5dda730..97f8a12 100644 --- a/_source/plugins/flash/plugin.js +++ b/_source/plugins/flash/plugin.js @@ -7,8 +7,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { var flashFilenameRegex = /\.swf(?:$|\?)/i; - var cssifyLength = CKEDITOR.tools.cssLength; - function isFlashEmbed( element ) { var attributes = element.attributes; @@ -18,19 +16,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function createFakeElement( editor, realElement ) { - var fakeElement = editor.createFakeParserElement( realElement, 'cke_flash', 'flash', true ), - fakeStyle = fakeElement.attributes.style || ''; - - var width = realElement.attributes.width, - height = realElement.attributes.height; - - if ( typeof width != 'undefined' ) - fakeStyle = fakeElement.attributes.style = fakeStyle + 'width:' + cssifyLength( width ) + ';'; - - if ( typeof height != 'undefined' ) - fakeStyle = fakeElement.attributes.style = fakeStyle + 'height:' + cssifyLength( height ) + ';'; - - return fakeElement; + return editor.createFakeParserElement( realElement, 'cke_flash', 'flash', true ); } CKEDITOR.plugins.add( 'flash', @@ -107,7 +93,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var attributes = element.attributes, classId = attributes.classid && String( attributes.classid ).toLowerCase(); - if ( !classId ) + if ( !classId && !isFlashEmbed( element ) ) { // Look for the inner for ( var i = 0 ; i < element.children.length ; i++ )