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?
You can use curly braces to add text to an element. Show activity on this post. Show activity on this post.
Emmet (formerly Zen Coding) is a set of plug-ins for text editors that allow for high-speed coding and editing in HTML, XML, XSLT, and other structured code formats via content assist.
Emmet can use [attr] notation (as in CSS) to add custom attributes to your elements, for example for a link. It is useful to add default values to elements. You can place as many attributes as you like inside square brackets [ ] .
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>
.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>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With