Daily Dev Notes 2024/05/29

Last week I implemented a Markdown Previewer using HTMX, which was fairly rudimentary - it just POSTed the contents of a textarea element to a Django view that returned the converted content, which HTMX swapped into the preview div element.

While this worked pretty well, I wasn't overly keen of the constant stream of POST requests that were being streamed to the server. I had played with some different delays to reduce the number of requests - but the higher the delay, the less interactive it felt. I also didn't want to implement a client-side markdown renderer with JavaScript, because I wanted to use the same renderer in the previewer that I'm using on this site.

Read more

Posted on May 29, 2024 by

Categories: Development