Generate Emmet Code from HTML

I'm talking about Emmet.io (formerly Zen coding)

Is there any Javascript code or a jQuery plugin that does this in reverse order?

Example:

emmet('ul > li*3') => '<ul><li></li><li></li><li></li></ul>' 

I don't look like that

 emmet('<ul><li></li><li></li><li></li></ul>') => 'ul > li*3' 

PS: I searched for searches for a long time before I decided to ask here. Thanks.

+6
source share
2 answers

Good. Let's do that.

We have a Sizzle selector. And with .size() I think we can achieve it.

Check out this question. It looks like: Reverse Zen coding .

0
source

HTML.js is what you are looking for
http://nbubna.imtqy.com/HTML/

0
source

All Articles