parse dimensions to configuration of TinyMCE + remove autoresize if height is set.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user