Skip to content

postxml/postxml-imgalt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Postxml plugin for addding alt attributes to images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published