parse dimensions to configuration of TinyMCE + remove autoresize if height is set.

This commit is contained in:
Niels Lyngsø
2019-06-03 12:04:14 +02:00
parent 2f978e96d4
commit f30aefb614

View File

@@ -41,10 +41,19 @@ angular.module("umbraco")
$q.all(promises).then(function (result) {
var standardConfig = result[promises.length - 1];
var width = parseInt(editorConfig.dimensions.width, 10) || null
var height = parseInt(editorConfig.dimensions.height, 10) || null
if (height !== null) {
standardConfig.plugins.splice(standardConfig.plugins.indexOf("autoresize"), 1);
}
//create a baseline Config to extend upon
var baseLineConfigObj = {
maxImageSize: editorConfig.maxImageSize
maxImageSize: editorConfig.maxImageSize,
width: width,
height: height
};
angular.extend(baseLineConfigObj, standardConfig);