var embedChange = (tinymce.Env.ie && tinymce.Env.ie <= 8) ? 'onChange' : 'onInput';
function guessMime(url) {
+ url = url.toLowerCase();
+
if (url.indexOf('.mp3') != -1) {
return 'audio/mpeg';
}
if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
if (e.control == widthCtrl) {
newHeight = Math.round((newWidth / width) * newHeight);
- heightCtrl.value(newHeight);
+
+ if (!isNaN(newHeight)) {
+ heightCtrl.value(newHeight);
+ }
} else {
newWidth = Math.round((newHeight / height) * newWidth);
- widthCtrl.value(newWidth);
+
+ if (!isNaN(newWidth)) {
+ widthCtrl.value(newWidth);
+ }
}
}
align: 'center',
spacing: 5,
items: [
- {name: 'width', type: 'textbox', maxLength: 3, size: 3, onchange: recalcSize},
+ {name: 'width', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Width'},
{type: 'label', text: 'x'},
- {name: 'height', type: 'textbox', maxLength: 3, size: 3, onchange: recalcSize},
+ {name: 'height', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Height'},
{name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions'}
]
});
editor.addMenuItem('media', {
icon: 'media',
- text: 'Insert video',
+ text: 'Insert/edit video',
onclick: showDialog,
context: 'insert',
prependToContext: true