Search code examples
phphtmlformattingphpstormauto-indent

PhpStorm - How to format HTML code in PHP tags


I don't understand how can I format correctly HTML code when is surrounded between PHP tags when I click "Auto-Indent Lines".

What do I expect:

enter image description here

What PhpStorm does when I click "Auto-Indent Lines".:

enter image description here


Solution

  • Please see comments in WI-17786. In general, it's not currently possible to format HTML mixed with PHP