summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mulk/benki/wiki.clj2
-rw-r--r--static/js/wiki.js7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mulk/benki/wiki.clj b/src/mulk/benki/wiki.clj
index 15ec12e..df772ae 100644
--- a/src/mulk/benki/wiki.clj
+++ b/src/mulk/benki/wiki.clj
@@ -121,5 +121,5 @@
:wiki_page_revisions
[:page :title :content :author :format]
[page-id title (unwikilinkify content) user "html5"])
- {:stetus 200, :headers {}, :body ""})
+ {:stetus 200, :headers {}, :body (wikilinkify (unwikilinkify content))})
{:status 403, :headers {}, :body ""}))))
diff --git a/static/js/wiki.js b/static/js/wiki.js
index 4f13af3..4cffdab 100644
--- a/static/js/wiki.js
+++ b/static/js/wiki.js
@@ -5,12 +5,15 @@ if (!mulk) {
}
mulk.savePage = function() {
- $.ajax({
+ jQuery.ajax({
url: "?save",
data: { content: $('#wiki-page-content').html() },
type: "POST",
- success: function() {
+ dataType: "text",
+ success: function(data) {
mulk.savePage();
+ console.log(data);
+ jQuery('#wiki-page-content').html(data);
console.log('Success.');
},
error: function() {