ES2015 Templates Not Properly Formatted in Emacs JavaScript Mode

Right now this looks awful if I use ES2015 templates:

let template ='<div data-value="${text}" class="label label-success"> ${text} <span data-nr="${nr}" class="background-switch glyphicon glyphicon-remove" style="border-radius:50%;margin-left: 2px; padding: 3px;" aria-hidden="true"> </span> </div>'; 

Is there a way to disable the default indent settings for a specific region? Or is there another way to format ES6 templates correctly?

+7
javascript emacs
source share

No one has answered this question yet.

See related questions:

1865
How to format javascript date
1668
How can I format numbers as a string of currency in JavaScript?
1350
Where can I find date formatting documentation in JavaScript?
513
Formatting a number accurate to two decimal places in JavaScript
449
How to "correctly" create a custom object in JavaScript?
403
How to format float in javascript?
133
Set 4 spaces in Emacs in text mode
101
How to change indentation width in javascript emacs mode
3
Dynamically loaded CSS that has no effect in a Windows 8 application
-one
How can I embed html code in javascript value?

All Articles