changes indicator

This commit is contained in:
2018-07-23 08:49:38 +03:00
parent 57048f5fc3
commit c0ccc40d17
3 changed files with 32 additions and 8 deletions

View File

@@ -12,13 +12,13 @@
title="File name to write. Must end in .txt to later edit."
value="{{ filename | safe }}" onclick="clear_text(this.id,'paste.txt')">
<br>
<input type=submit value=Save>
<a class="href_button" onclick="previewToggle()" title="Toggle preview window">Preview</a>
<input id=editor_save type=submit value=Save>
<a class="href_button" onclick="previewToggle()" title="Toggle Markdown preview window">Preview</a>
<a class="href_button" href="{{ url_for('list_view',name = name) }}" title="Forget all changes">Cancel</a>
</div>
<div id=editor_floats>
<textarea rows="25" name="paste" id="editor_area" autofocus oninput="updateEditorPreview()">{{ content | safe }}</textarea>
<div id=editor_preview style="display: block;"></div>
<textarea rows="25" name="paste" id="editor_area" autofocus oninput="updateEditor()">{{ content | safe }}</textarea>
<div id=editor_preview></div>
</div>
</form>
</div>
@@ -29,6 +29,7 @@
var md = new Remarkable({
linkify: true
});
updateEditorPreview();
var editorHash = hashCode(document.getElementById("editor_area").value);
updateEditor()
</script>
{% endblock %}