This how-to guide will show you how to return HTML content and use the htmx library for handling AJAX requests. To get started, make sure you have completed Tutorial 0 – Get it Running and have granted all permissions on the todos table to the web_anon user. We will be creating a to-do app and using Tailwind CSS for styling. The guide will walk you through creating functions for listing and creating to-dos, as well as editing and deleting them. The htmx library is used to enable AJAX functionality and provide a smooth user experience. By following these steps, you will have a fully functional to-do list.
https://postgrest.org/en/stable/how-tos/providing-html-content-using-htmx.html