Skip to content
Snippets Groups Projects
Commit 0e57b9de authored by Alyx's avatar Alyx
Browse files

removed markown editor

parent 4dc4ed06
No related branches found
No related tags found
No related merge requests found
...@@ -5,13 +5,10 @@ ...@@ -5,13 +5,10 @@
<form id="noteform"> <form id="noteform">
<input type="text" id="cleartextTitle"> <input type="text" id="cleartextTitle">
<div id="test-editor"> <div id="test-editor">
<div class="d-flex justify-content-center" id="loadingSpinner"> <div class="form-group">
<div class="spinner-border" role="status"> <label for="noteeditor">Entry</label>
<span class="sr-only">Loading...</span> <textarea class="form-control" id="noteeditor" rows="10"></textarea>
</div> </div> </div>
</div>
<textarea style="display:none;" id="noteeditor"></textarea>
</div>
<p> <p>
<button id="editor-submit" type="submit" class="btn btn-success">Save</button> <button id="editor-submit" type="submit" class="btn btn-success">Save</button>
<span id="savedstatus" class="text-muted">Last saved <span id="saved-time"></span></span> <span id="savedstatus" class="text-muted">Last saved <span id="saved-time"></span></span>
...@@ -34,11 +31,7 @@ ...@@ -34,11 +31,7 @@
loadNote(); loadNote();
}); });
var editor = editormd("test-editor", {
width: "100%",
height: 720,
path: "/editormd/lib/"
});
function loadNote() { function loadNote() {
$.ajax({ $.ajax({
...@@ -59,7 +52,7 @@ ...@@ -59,7 +52,7 @@
e.preventDefault(); // avoid to execute the actual submit of the form. e.preventDefault(); // avoid to execute the actual submit of the form.
encryptedTitle = CryptoJS.AES.encrypt($("#cleartextTitle").val(), sessionStorage.getItem('key')).toString(); encryptedTitle = CryptoJS.AES.encrypt($("#cleartextTitle").val(), sessionStorage.getItem('key')).toString();
encryptedBody = CryptoJS.AES.encrypt(editor.getMarkdown(), sessionStorage.getItem('key')).toString(); encryptedBody = CryptoJS.AES.encrypt($("#noteeditor").val(), sessionStorage.getItem('key')).toString();
$.post("/note/edit/{{$id}}", { $.post("/note/edit/{{$id}}", {
"_token": "{{ csrf_token() }}", "_token": "{{ csrf_token() }}",
title: encryptedTitle, title: encryptedTitle,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment