diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js index 7821c00e691f..8367836f79b0 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js @@ -82,6 +82,9 @@ angular.module("umbraco.directives") //custom initialization for this editor within the grid editor.on('init', function (e) { + //register global variable to re-save the dragged RTE settings in the controller + editor.settings = baseLineConfigObj; + // Used this init event - as opposed to property init_instance_callback // to turn off the loader scope.isLoading = false; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js index 0add6cf0efe8..e28b0b391f51 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js @@ -75,7 +75,7 @@ angular.module("umbraco") ui.item.find(".umb-rte").each(function (key, value) { // remove all RTEs in the dragged row and save their settings var rteId = value.id; - var editor = _.findWhere(tinyMCE.editors, { id: rteId }); + var editor = _.findWhere(tinyMCE.get() , { id: rteId }); if (editor) { draggedRteSettings[rteId] = editor.settings; } @@ -92,7 +92,7 @@ angular.module("umbraco") var rteId = value.id; var settings = draggedRteSettings[rteId]; if (!settings) { - var editor = _.findWhere(tinyMCE.editors, { id: rteId }); + var editor = _.findWhere(tinyMCE.get() , { id: rteId }); if (editor) { settings = editor.settings; } @@ -189,7 +189,7 @@ angular.module("umbraco") if ($.inArray(rteId, notIncludedRte) < 0) { // remember this RTEs settings, cause we need to update it later. - var editor = _.findWhere(tinyMCE.editors, { id: rteId }) + var editor = _.findWhere(tinyMCE.get(), { id: rteId }) if (editor) { draggedRteSettings[rteId] = editor.settings; } @@ -203,9 +203,8 @@ angular.module("umbraco") var rteId = $(this).attr("id"); if ($.inArray(rteId, notIncludedRte) < 0) { - // remember this RTEs settings, cause we need to update it later. - var editor = _.findWhere(tinyMCE.editors, { id: rteId }) + var editor = _.findWhere(tinyMCE.get() , { id: rteId }) if (editor) { draggedRteSettings[rteId] = editor.settings; } @@ -236,7 +235,7 @@ angular.module("umbraco") var rteId = value.id; // remember this RTEs settings, cause we need to update it later. - var editor = _.findWhere(tinyMCE.editors, { id: rteId }); + var editor = _.findWhere(tinyMCE.get() , { id: rteId }); // save the dragged RTE settings if (editor) { @@ -258,7 +257,7 @@ angular.module("umbraco") var rteId = value.id; if ($.inArray(rteId, notIncludedRte) < 0) { - var editor = _.findWhere(tinyMCE.editors, { id: rteId }); + var editor = _.findWhere(tinyMCE.get() , { id: rteId }); if (editor) { draggedRteSettings[rteId] = editor.settings; }