Day 31 Dev Notes
Just a small change today. I was having so much fun with the Markdown previewer that I add a keyup
event so that it became a live previewer, rather than having to press the Preview button.
A fairly simple change:
<textarea
class="form-control"
rows="24"
placeholder="Markdown content"
id="content"
name="content"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-post="{% url "djpress_admin:preview_markdown" %}"
hx-params="content"
hx-target="#preview"
hx-trigger="keyup changed delay:250ms"
></textarea>