X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fflash%2Fdialogs%2Fflash.js;h=861cc34daa7f26014f812d3a250c83da9541c9e8;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hp=5634229a65a173e33a2a6306e1fbc3886fe9162a;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/flash/dialogs/flash.js b/_source/plugins/flash/dialogs/flash.js index 5634229..861cc34 100644 --- a/_source/plugins/flash/dialogs/flash.js +++ b/_source/plugins/flash/dialogs/flash.js @@ -175,8 +175,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var previewPreloader, previewAreaHtml = '
' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'
' + - '' + - '
'; + '' + + '
'; return { title : editor.lang.flash.title, @@ -186,7 +186,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { // Clear previously saved elements. this.fakeImage = this.objectNode = this.embedNode = null; - previewPreloader = new CKEDITOR.dom.element( 'embeded', editor.document ); + previewPreloader = new CKEDITOR.dom.element( 'embed', editor.document ); // Try to detect any embed or object tag that has Flash parameters. var fakeImage = this.getSelectedElement(); @@ -265,12 +265,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i ); } - // Apply or remove flash parameters. - var extraStyles = {}; - this.commitContent( objectNode, embedNode, paramMap, extraStyles ); + // A subset of the specified attributes/styles + // should also be applied on the fake element to + // have better visual effect. (#5240) + var extraStyles = {}, extraAttributes = {}; + this.commitContent( objectNode, embedNode, paramMap, extraStyles, extraAttributes ); // Refresh the fake image. var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true ); + newFakeImage.setAttributes( extraAttributes ); newFakeImage.setStyles( extraStyles ); if ( this.fakeImage ) { @@ -572,7 +575,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license [ editor.lang.flash.alignTop , 'top'] ], setup : loadValue, - commit : commitValue + commit : function( objectNode, embedNode, paramMap, extraStyles, extraAttributes ) + { + var value = this.getValue(); + commitValue.apply( this, arguments ); + value && ( extraAttributes.align = value ); + } }, { type : 'html',