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:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user