Search code examples
intellij-ideapluginsintellij-plugin

Intellij add standard attributes to html tag via plugin


In IntelliJ,

when I type <in it auto suggests me the <input> -field. If I press tab/enter, I get what was proposed.
I am coming from atom for frontend stuff, where if you press enter there, you get the input field with the basic attributes, like this:

<input type="" name="" value="">

Is there a plugin / setting for intellij to do the same?
I am already using live template/edit, this does not seem to do the trick.


Solution

  • Don't enter the opening angle bracket, just enter in, hit Ctrl+Space, then choose input Emmet live template from completion list. By default, it will expand to <input type="text">, but you can change the input live template in Settings | Editor | Live Templates, Zen HTML to add more predefined attributes to it, like:

    <input type="$VAR0$" name="$NAME$" value="$VALUE$">