Search code examples
phpstormcode-formattingmjml

How to configure code formatting for .mjml file in PhpStorm editor


I'm using mjml to create a mailer template with npm and using PhpStorm as my IDE.

But for some reason my code isn't visually formatting in html which doesn't make it easy to build templates.

enter image description here

Is there any way to configure custom file types in PhpStorm like .mjml to run html formatted code rather than plain text?


Solution

  • What language type do you have .mjml files associated with in File | Settings | Editor | File Types? They should be assigned to HTML by the looks of it. enter image description here