Answer the question
In order to leave comments, you need to log in
How can HTML code written in one line be converted into several lines depending on the depth of nesting of tags?
It is necessary that when a keyboard shortcut is pressed, the selected HTML code, written in one line, is converted into several lines according to the template, depending on the depth of nesting of the tags.
For example:
Before
<ul>
<li><label for=""></label><input type="text"></li>
<li><label for=""></label><input type="text"></li>
<li><label for=""></label><input type="text"></li>
</ul>
<ul>
<li>
<label for=""></label>
<input type="text">
</li>
<li>
<label for=""></label>
<input type="text">
</li>
<li>
<label for=""></label>
<input type="text">
</li>
</ul>
<p class="appointment-item"><input type="text" name="time" id="" placeholder="10:00" value=""></p>
<p class="appointment-item">
<input type="text" name="date" id="" placeholder="08.10.2017" value="">
</p>
Answer the question
In order to leave comments, you need to log in
Sublime Text 3 has a plugin: auto format html
Download it via Package Control and enjoy ;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question