checkpoint: working markdown<=>html converter

This commit is contained in:
evilchili
2025-12-25 10:29:46 -08:00
parent c540073b66
commit f21bdbdb0c
20 changed files with 1274 additions and 10643 deletions
+14 -8
View File
@@ -1,20 +1,26 @@
{% extends "base.html" %}
{% block styles %}
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='editor/editor.css' ) }}">
{% endblock %}
{% block content %}
<div id='{% if user.can_write(page) %}editor{% else %}viewer{% endif %}' class='read-only'>
{{ page.body }}
</div>
<div id='content'>{{ page.body }}</div>
{% endblock %}
{% block scripts %}
<script src="{{ url_for('static', filename='editor/commonmark.js' ) }}"></script>
<script src="{{ url_for('static', filename='editor/turndown.js' ) }}"></script>
<script src="{{ url_for('static', filename='editor/turndown-plugin-gfm.js' ) }}"></script>
<script src="{{ url_for('static', filename='editor/editor.js' ) }}"></script>
<!-- for converting markdown to html -->
<script src="{{ url_for('static', filename='editor/purify.min.js' ) }}"></script>
<script src="{{ url_for('static', filename='editor/marked.umd.min.js' ) }}"></script>
<script src="{{ url_for('static', filename='editor/grung.js' ) }}"></script>
{% if user.can_write(page) %}
<script src="{{ url_for('static', filename='editor/turndown.js' ) }}"></script>
<script src="{{ url_for('static', filename='editor/joplin-turndown-plugin-gfm.js' ) }}"></script>
<script src="{{ url_for('static', filename='editor/grung-editor.js' ) }}"></script>
{% endif %}
<script>
const wiki = new Grung{% if user.can_write(page) %}Editor{% endif %}({plugins: [MacroPlugin]});
wiki.view();
</script>
{% endblock %}