Ticket #5240: 5240.patch

File 5240.patch, 1.5 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/flash/dialogs/flash.js

     
    265265                                                paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i );
    266266                                }
    267267
    268                                 // Apply or remove flash parameters.
    269                                 var extraStyles = {};
    270                                 this.commitContent( objectNode, embedNode, paramMap, extraStyles );
     268                                // A subset of the specified attributes/styles
     269                                // should also be applied on the fake element to
     270                                // have better visual effect. (#5240)
     271                                var extraStyles = {}, extraAttributes = {};
     272                                this.commitContent( objectNode, embedNode, paramMap, extraStyles, extraAttributes );
    271273
    272274                                // Refresh the fake image.
    273275                                var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true );
     276                                newFakeImage.setAttributes( extraAttributes );
    274277                                newFakeImage.setStyles( extraStyles );
    275278                                if ( this.fakeImage )
    276279                                {
     
    572575                                                                                [ editor.lang.flash.alignTop , 'top']
    573576                                                                        ],
    574577                                                                        setup : loadValue,
    575                                                                         commit : commitValue
     578                                                                        commit : function( objectNode, embedNode, paramMap, extraStyles, extraAttributes )
     579                                                                        {
     580                                                                                var value = this.getValue();
     581                                                                                commitValue.apply( this, arguments );
     582                                                                                value && ( extraAttributes.align = value );
     583                                                                        }
    576584                                                                },
    577585                                                                {
    578586                                                                        type : 'html',
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy