CKEditor: Fix fake image for responsive video - refs BT#15974

pull/4101/head
Angel Fernando Quiroz Campos 6 years ago
parent c918f18247
commit 62fafb67a7
  1. 11
      main/inc/lib/javascript/ckeditor/plugins/video/dialogs/video.js
  2. 7
      main/inc/lib/javascript/ckeditor/plugins/video/plugin.js

@ -205,7 +205,8 @@ CKEDITOR.dialog.add( 'video', function ( editor )
var responsiveParent = null;
// Refresh the fake image.
var newFakeImage = editor.createFakeElement( videoNode, 'cke_video', 'video', false );
var newFakeImageClass = 'cke_video' + (responsive ? ' embed-responsive-item' : '');
var newFakeImage = editor.createFakeElement( videoNode, newFakeImageClass, 'video', false );
newFakeImage.setStyles( extraStyles );
if ( this.fakeImage )
{
@ -417,7 +418,13 @@ CKEDITOR.dialog.add( 'video', function ( editor )
label: lang.responsive,
items: [ [ lang.ratio16by9, '16by9' ], [ lang.ratio4by3, '4by3' ] ],
commit : commitValue,
setup : loadValue
setup : loadValue,
onChange: function () {
var dialog = this.getDialog();
dialog.setValueOf('info', 'width', '100%');
dialog.setValueOf('info', 'height', '100%');
}
}
]
},

@ -139,7 +139,12 @@ CKEDITOR.plugins.add( 'video',
realElement.children[ i ].name = 'cke:source'
}
var fakeElement = editor.createFakeParserElement( realElement, 'cke_video', 'video', false ),
var fakeElement = editor.createFakeParserElement(
realElement,
'cke_video ' + realElement.attributes.class,
'video',
false
),
fakeStyle = fakeElement.attributes.style || '';
var width = realElement.attributes.width,

Loading…
Cancel
Save