postxml-imgalt
v0.1.1
Published
Postxml plugin for adding alt attributes to images.
Downloads
2
Readme
postxml-imgalt
PostXML plugin for adding alt attributes to images.
Installation
npm i postxml-imgalt --save-dev
Usage
var fs = require('fs'),
postxml = require('postxml'),
plugin = require('postxml-imgalt');
var html = fs.readFileSync('input.html', 'utf8');
var output = postxml(
html,
[
plugin()
]
);
Example
Input
<img src="image.png">
Output
<img src="image.png" alt="">
Licence
MIT