Setting Emmet/live templates in PhpStorm

When I write img.logo the output is

<img src="" alt="" class="logo">

But I want to swap the position of the "class" attribute so it comes first:

<img class="logo" src="" alt="" >

How can I do this?

Please, help. I searched for the information but could not find.

Upvotes: 0

Views: 304

Answers (1)

LazyOne
LazyOne

Reputation: 165088

I'm afraid that's not possible (for img.logo expansion).

  1. Current behaviour matches the actual Emmet. Try it yourself at https://docs.emmet.io/actions/expand-abbreviation/

  2. It was asked before (earlier this year) and JetBrains declined such a request with no plans of implementing such a customization: https://youtrack.jetbrains.com/issue/WEB-55938


P.S. If it's just img expansion or another standard abbreviation (e.g. img:s, img:sizes, img:z etc) then you could change the underlying Live Template that is actually used for such predefined abbreviations (at Settings/Preferences | Editor | Live Templates --> Zen HTML node). But it is not possible for dynamic expansion (with class names/ids etc).

Upvotes: 1

Related Questions