2025-09-27 16:20:08 -07:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
2025-10-11 15:37:00 -07:00
|
|
|
{% block styles %}
|
|
|
|
|
<link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" />
|
2025-09-28 14:14:16 -07:00
|
|
|
{% endblock %}
|
2025-10-11 15:37:00 -07:00
|
|
|
|
2025-09-27 16:20:08 -07:00
|
|
|
{% block content %}
|
2025-10-11 15:37:00 -07:00
|
|
|
<form id="editor_form">
|
|
|
|
|
|
|
|
|
|
<h1><input name='title' type='text' value="{{ page.title }}"></h1>
|
|
|
|
|
{% include "breadcrumbs.html" %}
|
2025-09-28 14:14:16 -07:00
|
|
|
|
2025-10-11 15:37:00 -07:00
|
|
|
<div id='page_body'></div>
|
|
|
|
|
|
|
|
|
|
</form>
|
2025-09-27 16:20:08 -07:00
|
|
|
{% endblock %}
|
2025-09-28 14:14:16 -07:00
|
|
|
|
2025-10-11 15:37:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
|
<script src="https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
const editor = new toastui.Editor({
|
|
|
|
|
el: document.querySelector('#page_body'),
|
|
|
|
|
initialEditType: 'wysiwyg',
|
|
|
|
|
initialValue: document.getElementById("data_form__body").value,
|
|
|
|
|
previewStyle: 'tab',
|
|
|
|
|
usageStatistics: false
|
|
|
|
|
});
|
|
|
|
|
editor.getMarkdown();
|
|
|
|
|
console.log(editor);
|
|
|
|
|
</script>
|
|
|
|
|
{% endblock %}
|