Fix markdown input initial value and crash when alpine is not loaded

This commit is contained in:
2024-10-20 18:13:48 +02:00
parent 45441c351d
commit 301fc73687
2 changed files with 22 additions and 10 deletions

View File

@ -2,6 +2,8 @@
<script-once src="{{ statics.js }}" defer></script-once>
<link-once rel="stylesheet" type="text/css" href="{{ statics.css }}" defer></link-once>
<markdown-input name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% if widget.value %}{{ widget.value }}{% endif %}</markdown-input>
<markdown-input name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
<slot name="initial" style="display: none">{% if widget.value %}{{ widget.value }}{% endif %}</slot>
</markdown-input>
</div>