1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added editor control in admin settings & Fixed some markdown editor bugs

Also updated the setting system with a more sane approach to handling default values. (Now done via the setting-defaults config file)
This commit is contained in:
Dan Brown
2016-03-29 19:26:13 +01:00
parent efb49019d4
commit e1994ef2cf
7 changed files with 53 additions and 18 deletions

View 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;