Fix for issue #7461 ("Inserting a macro in the rich test editor (RTE) in the Grid makes it disappear on Save & Publish") (#8437)

This commit is contained in:
Joshua Brown
2020-07-22 18:05:07 +01:00
committed by GitHub
parent 78c429c4af
commit 511a7f1371
2 changed files with 5 additions and 1 deletions

View File

@@ -87,7 +87,9 @@ angular.module("umbraco.directives")
tinyMceService.initializeEditor({
editor: editor,
model: scope,
currentForm: angularHelper.getCurrentForm(scope)
// Form is found in the scope of the grid controller above us, not in our isolated scope
// https://github.com/umbraco/Umbraco-CMS/issues/7461
currentForm: angularHelper.getCurrentForm(scope.$parent)
});
//custom initialization for this editor within the grid

View File

@@ -1504,6 +1504,8 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
});
args.editor.on('Dirty', function (e) {
syncContent(); // Set model.value to the RTE's content
//make the form dirty manually so that the track changes works, setting our model doesn't trigger
// the angular bits because tinymce replaces the textarea.
if (args.currentForm) {