posthtml-to-svg-tags

June 29, 2015 ยท View on GitHub

PostHTMLToSvgTags is plugin for PostHTML. It convert all HTML tags to SVG equals and maybe with new structure.

Usage

var posthtml = require('posthtml'),
	html = '<div class="wow">OMG</div>';    

posthtml([ require('posthtml-to-svg-tags')()])
    .process(html)
    .then(function(result) {
        console.log(result);
    });
    
// <g id="wow">OMG</g>