diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js index 7b3d5698c5..3bebb8c078 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js @@ -57,9 +57,11 @@ function MarkdownEditorController($scope, $element, assetsService, dialogService }); editor2.hooks.set("onPreviewRefresh", function () { - angularHelper.getCurrentForm($scope).$setDirty(); - // We must manually update the model as there is no way to hook into the markdown editor events without editing that code. - $scope.model.value = $("textarea", $element).val(); + // We must manually update the model as there is no way to hook into the markdown editor events without exstensive edits to the library. + if ($scope.model.value != $("textarea", $element).val()) { + angularHelper.getCurrentForm($scope).$setDirty(); + $scope.model.value = $("textarea", $element).val(); + } }); }, 200);