Merge pull request #1435 from neilgaietto/U4-8822

U4-8822- Fixes Unpublish error with empty RTE
This commit is contained in:
Sebastiaan Janssen
2018-03-14 00:10:49 +01:00
committed by GitHub

View File

@@ -359,7 +359,8 @@ angular.module("umbraco")
//this is instead of doing a watch on the model.value = faster
$scope.model.onValueChanged = function (newVal, oldVal) {
//update the display val again if it has changed from the server;
tinyMceEditor.setContent(newVal, { format: 'raw' });
//uses an empty string in the editor when the value is null
tinyMceEditor.setContent(newVal || "", { format: 'raw' });
//we need to manually fire this event since it is only ever fired based on loading from the DOM, this
// is required for our plugins listening to this event to execute
tinyMceEditor.fire('LoadContent', null);