Ticket #3171: 3171.patch
File 3171.patch, 3.0 KB (added by , 15 years ago) |
---|
-
_source/plugins/flash/dialogs/flash.js
177 177 '<div id="FlashPreviewLoader" style="display:none"><div class="loading"> </div></div>' + 178 178 '<div id="FlashPreviewBox"></div></div>'; 179 179 180 var clearPreview = function( dialog ) 181 { 182 if ( dialog.preview ) 183 dialog.preview.setHtml(''); 184 }; 185 180 186 return { 181 187 title : editor.lang.flash.title, 182 188 minWidth : 400, … … 285 291 this.restoreSelection(); 286 292 editor.insertElement( newFakeImage ); 287 293 } 294 clearPreview( this ); 295 }, 296 297 onCancel : function() 298 { 299 clearPreview( this ); 288 300 }, 301 289 302 contents : [ 290 303 { 291 304 id : 'info', … … 317 330 commit : commitValue, 318 331 onLoad : function() 319 332 { 320 var dialog = this.getDialog(); 321 var previewElement = dialog.getContentElement( 'info', 'preview' ).getElement().getChild( 3 ); 322 this.getInputElement().on( 'change', function() 323 { 324 previewElement.setHtml( '<embed height="100%" width="100%" src="' 325 + CKEDITOR.tools.htmlEncode( this.getValue() ) 326 + '" type="application/x-shockwave-flash"></embed>' ); 333 var dialog = this.getDialog(), 334 updatePreview = function( src ){ 335 336 dialog.preview.setHtml( '<embed height="100%" width="100%" src="' 337 + CKEDITOR.tools.htmlEncode( src ) 338 + '" type="application/x-shockwave-flash"></embed>' ); 339 }; 340 // Preview element 341 dialog.preview = dialog.getContentElement( 'info', 'preview' ).getElement().getChild( 3 ); 342 343 // Sync on inital value loaded. 344 this.on( 'change', function( evt ){ 345 346 if ( evt.data && evt.data.value ) 347 updatePreview( evt.data.value ); 327 348 } ); 349 // Sync when input value changed. 350 this.getInputElement().on( 'change', function( evt ){ 351 352 updatePreview( this.getValue() ); 353 }, this ); 328 354 } 329 355 }, 330 356 { -
_source/plugins/fakeobjects/plugin.js
12 12 $ : function( element, filter ) 13 13 { 14 14 var realHtml = element.attributes._cke_realelement; 15 realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) , filter),15 realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ), 16 16 realElement = realFragment && realFragment.children[ 0 ]; 17 17 18 18 if ( realElement )