Various tools support JavaScript template literals prefixed with an "HTML" comment. VSCode provides syntax highlighting for the following and Prettier will format it too:
const html = /* HTML */ ` <script src="https://unpkg.com/htmx.org@1.9.6"></script>
<!-- have a button POST a click via AJAX -->
<button hx-post="/clicked" hx-swap="outerHTML">Click Me</button>`;
I'd like to see htmx-tags support HTMX attributes inside JavaScript template literals too.
Various tools support JavaScript template literals prefixed with an "HTML" comment. VSCode provides syntax highlighting for the following and Prettier will format it too:
I'd like to see htmx-tags support HTMX attributes inside JavaScript template literals too.