Improve mobile editing

This commit is contained in:
2026-06-05 10:27:56 +02:00
parent de3abed6d7
commit 7be8bec446
7 changed files with 96 additions and 20 deletions
+5 -1
View File
@@ -5,12 +5,16 @@
{{define "content"}}
<script>
document.body.classList.add('edit-mode');
if (sessionStorage.getItem('editor-wide') === '1') document.body.classList.add('editor-wide');
</script>
<form id="edit-form" class="edit-form" method="POST" action="{{.PostURL}}">
{{if ge .SectionIndex 0}}<input type="hidden" name="section" value="{{.SectionIndex}}">{{end}}
{{if ge .InsertBefore 0}}<input type="hidden" name="insert_before" value="{{.InsertBefore}}">{{end}}
<div class="editor-toolbar">
<button type="button" class="btn btn-tool" data-action="undo" title="Undo"></button>
<button type="button" class="btn btn-tool" data-action="redo" title="Redo"></button>
<span class="toolbar-sep"></span>
<button type="button" class="btn btn-tool" data-action="bold" data-key="B" title="Bold (B)">**</button>
<button type="button" class="btn btn-tool" data-action="italic" data-key="I" title="Italic (I)">*</button>
<span class="dropdown">
@@ -74,7 +78,7 @@
<div id="editor" class="editor-cm"></div>
<textarea name="content" id="editor-content" hidden>{{.RawContent}}</textarea>
</form>
<script src="/_/editor/vendor/codemirror.bundle.js"></script>
<script src="/_/editor/vendor/codemirror.bundle.js?v={{editorBundleVersion}}"></script>
<script src="/_/editor/tables.js"></script>
<script src="/_/editor/dates.js"></script>
<script src="/_/editor/movie.js"></script>