diff --git a/BookAStar/BookAStar.Droid/MarkdownEditor.cshtml b/BookAStar/BookAStar.Droid/MarkdownEditor.cshtml
index 2d28ab19..95c8e56e 100644
--- a/BookAStar/BookAStar.Droid/MarkdownEditor.cshtml
+++ b/BookAStar/BookAStar.Droid/MarkdownEditor.cshtml
@@ -2,47 +2,81 @@
+
-
-
-
-
-
+ .hidden {
+ display: none;
+ }
+
-
@Html.Write(Model)
+
@Html.Write(Model)
-
-
-
-
-
+
+
+
+
+
+ function getMD() {
+ return markdownize($('#bubble-container div.ql-editor').html())
+ }
+ quill.on('text-change', function (delta, oldDelta, source)
+ {
+ if (source === "user") {
+ $('#md').val(getMD());
+ $('#btnSubmit').removeClass('hidden');
+ }
+ });
+ $(document).ready(function () {
+ $('#btnSubmit').on('click', function () {
+ $.get("file:validate?md=" + encodeURIComponent(getMD()),
+ function (data, stat, jqXHR) { $('#result').html("Okay") })
+ })
+ });
+