Webstorm HTML defragmentation feature

Source: Internet
Author: User

When we write HTML template in string form, or add HTML content to a tag, such as, if this str is more long, once there is less a single quotation mark, less a plus sign, the basic error can not understand, a face Meng forced ...

 //  var  datajson = [{item.name  =" China ", Item.id  =" 1 " =" haha ", Item.link  =" www.google.com "},     just write a note.   ...}]  var  item = Datajson[0];  var  str = ' <li itemid= ' ' + item.id + ' ">

;$ ( ' #box '). Text (str);

Well, then, I was smart, so I wrote Str.

var str = ' <li itemid= ' ' + item.id + '">        

' + item.name + '< /h4> <p>' + item.content + '</p> <p class= "Item.link" >' + item.link + ' </ P></li> ';

But obsessive-compulsive disorder may be confused, not all of them! So, previously discovered a function of webstorm , the effect is as follows

The upper part of Str becomes very difficult to see, but the formatted place (lower part) shows good results and is clear at a glance. This function is called edit HTML Fragment (edit HTML fragment)

The operation steps are:

1, to the HTML part of STR alt+enter

2. Select Edit HTML fragment,enter OK

Of course, there are four functions in it, if you do not want that function, the cursor is selected the right button, disable it, and then it will never appear

Disabled you will regret, how to do? Where to find it? Google a bit, well, found, first we want to know its name is called Edit injected fragment, then,

File------and setting--and intentions, then on the right we see Language injection, the one you want to disable.

The above is said that the whole content, a lot of nonsense, the picture is too much, well, I hope to be helpful to you

Webstorm HTML defragmentation feature

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.