Fix initial size of the image preview in the mediatag dialog

pull/1/head
yflory 6 years ago
parent 525703e7d8
commit ab07554d0b

@ -47,6 +47,23 @@ body.cp-app-pad {
display: block; display: block;
overflow-x: auto; overflow-x: auto;
max-height: 100vh; max-height: 100vh;
.cke_dialog_contents {
#ck-mediatag-preview {
margin: auto;
resize: both;
max-width: 300px;
max-height: 300px;
overflow: auto;
}
media-tag {
display: flex;
border-style: solid;
border-color: black;
&> * {
flex-shrink: 0;
}
}
}
} }
.cke_wysiwyg_frame { .cke_wysiwyg_frame {

@ -43,9 +43,7 @@ CKEDITOR.dialog.add('mediatag', function (editor) {
type: 'html', type: 'html',
id: 'preview', id: 'preview',
html: '<label>'+Messages.preview+'</label>'+ html: '<label>'+Messages.preview+'</label>'+
'<div id="ck-mediatag-preview"'+ '<div id="ck-mediatag-preview"></div>'
'style="margin:auto;resize:both;max-width:300px;max-height:300px;overflow:auto"'+
'></div>'
}, },
] ]
}, },
@ -77,11 +75,6 @@ CKEDITOR.dialog.add('mediatag', function (editor) {
var $preview = $(dialog).find('#ck-mediatag-preview'); var $preview = $(dialog).find('#ck-mediatag-preview');
var $clone = $(el.$).clone(); var $clone = $(el.$).clone();
$clone.css({
display: 'flex',
'border-style': 'solid',
'border-color': 'black'
});
$preview.html('').append($clone); $preview.html('').append($clone);
var center = function () { var center = function () {

Loading…
Cancel
Save