Is there a way to encode text inside an element in Emmet. For example if I want to create a would this be possible with emmet abbreviations?
Asked
Active
Viewed 1.1k times
4 Answers
45
You can use curly braces to add text to an element.
For example article{This is some text inside an article}
expands to <article>This is some text inside an article</article>

aphilas
- 2,066
- 1
- 14
- 9
15
.item{My $ text}*3
<div class="item">My 1 text</div>
<div class="item">My 2 text</div>
<div class="item">My 3 text</div>

NIck Sh
- 151
- 1
- 2
2
The first example starts from 1 and the second example starts from 6
ul>li.item$*5
<ul>
<li class="item1"></li>
<li class="item2"></li>
<li class="item3"></li>
<li class="item4"></li>
<li class="item5"></li>
</ul>
ul>li.item$@6*5
<ul>
<li class="item6"></li>
<li class="item7"></li>
<li class="item8"></li>
<li class="item9"></li>
<li class="item10"></li>
</ul>

anonymous
- 1,499
- 2
- 18
- 39
1
You can insert lorem ipsum to tags, e.g.
li.text-warning>lorem10
Result:
<li class="text-warning">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex, molestias.</li>
Hope that workaround is ok.

mhermano
- 89
- 9
My Text
– Andy Mar 07 '17 at 19:36