Rifton007 Rifton007 - 1 month ago 8
HTML Question

How to reformat HTML code in JavaScript file in PhpStorm

I'm using PhpStorm 2016.2 and developing a web application with VueJS.

In PhpStorm I would like reformat HTML code in my JavaScript file. But when I click

Code | Reformat
only JavaScript is reformatted.

How to reformat both JavaScript and HTML?

HTML code in a JavaScript file is not reformatted by PhpStorm

Answer Source

2016.2 doesn't support formatting HTML injected in Typescript/ECMAScript 6. This feature (WEB-18307) is available since 2017.1, see https://www.jetbrains.com/help/webstorm/2017.1/using-language-injections.html#d240474e440