postxml-imgalt

0.1.1 • Public • Published

postxml-imgalt

npm version

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

Package Sidebar

Install

npm i postxml-imgalt

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • yepninja