]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/controllers.js
Added basic system tests for markdown editor, Added extra test helpers
[bookstack] / resources / assets / js / controllers.js
index 09187c0c259654061ce818632fe544725d1d38d9..dbd2e1ae6557712f7cbc15d87e13fce821ffb106 100644 (file)
@@ -258,6 +258,10 @@ module.exports = function (ngApp, events) {
             }
         }
 
+        if (!isMarkdown) {
+            $scope.editorChange = function() {};
+        }
+
         /**
          * Start the AutoSave loop, Checks for content change
          * before performing the costly AJAX request.
@@ -292,8 +296,6 @@ module.exports = function (ngApp, events) {
 
             if (isMarkdown) data.markdown = $scope.editContent;
 
-            console.log(data.markdown);
-
             $http.put('/ajax/page/' + pageId + '/save-draft', data).then((responseData) => {
                 $scope.draftText = responseData.data.message;
                 if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true;