Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template literal support #6

Open
mfulton26 opened this issue Oct 6, 2023 · 1 comment
Open

template literal support #6

mfulton26 opened this issue Oct 6, 2023 · 1 comment

Comments

@mfulton26
Copy link

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/[email protected]"></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.

@erhanertem
Copy link

erhanertem commented May 1, 2024

Indeed, its needed. Too bad that currently no tool in vscode marketplace supports that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants