Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emmet abbreviations- text inside an element tag

Tags:

emmet

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?

like image 777
Omegaman Avatar asked Nov 15 '14 20:11

Omegaman


People also ask

How do you add text to Emmet?

You can use curly braces to add text to an element. Show activity on this post. Show activity on this post.

What is Emmet abbreviation in HTML?

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.

How do I set attributes in Emmet?

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 [ ] .


3 Answers

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>

like image 156
Neville Omangi Avatar answered Oct 29 '22 07:10

Neville Omangi


.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>
like image 37
NIck Sh Avatar answered Oct 29 '22 07:10

NIck Sh


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.

like image 1
mhermano Avatar answered Oct 29 '22 08:10

mhermano