Fixed bug that made it possible for an article's content to disappear when reworking it

This commit is contained in:
Jason Streifling 2024-09-10 19:31:34 +02:00
parent 4004bcb8f0
commit dadd610b2d

View File

@ -15,7 +15,7 @@
<div class="flex flex-col gap-y-1"> <div class="flex flex-col gap-y-1">
<label for="easyMDE">Artikel</label> <label for="easyMDE">Artikel</label>
<textarea id="easyMDE">{{.Content}}</textarea> <textarea id="easyMDE">{{.Content}}</textarea>
<input id="article-content" name="article-content" type="hidden" /> <input id="article-content" name="article-content" type="hidden" value="{{.Content}}" />
</div> </div>
<div> <div>
@ -44,8 +44,6 @@
</form> </form>
<script> <script>
document.getElementById('article-content').value = easyMDE.value();
var easyMDE = new EasyMDE({ var easyMDE = new EasyMDE({
element: document.getElementById('easyMDE'), element: document.getElementById('easyMDE'),
hideIcons: ['image'], hideIcons: ['image'],