Skip to content

Commit

Permalink
Added a markdown editor to make writing more pleasant
Browse files Browse the repository at this point in the history
  • Loading branch information
HermanMartinus committed Jun 15, 2020
1 parent 7703907 commit b0f9fad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ <h1>Dashboard</h1>
<a href="{% url 'user_delete' %}">Delete account</a>
</p>
{% endif %}

{% include 'snippets/markdown_editor.html' %}
{% endblock %}
2 changes: 2 additions & 0 deletions templates/dashboard/post_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ <h1>
<a href="/dashboard/posts/{{ post.pk }}/delete">Delete post</a>
</p>
{% endif %}

{% include 'snippets/markdown_editor.html' %}
{% endblock %}
5 changes: 5 additions & 0 deletions templates/snippets/markdown_editor.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<script>
var simplemde = new SimpleMDE();
</script>

0 comments on commit b0f9fad

Please sign in to comment.