posthtml-insert

0.1.0 • Public • Published

posthtml-insert

PostHTML plugin to insert content after HTML tag.

Installation

npm install posthtml-insert --save

Usage

const posthtml = require('posthtml')
const insert = require('posthtml-insert')

posthtml([insert({ selector: 'body', content: '<div>test</div>' })])
  .process('<body></body>')
  .then(({ html }) => {
    console.log(html)
    // => '<body><div>test</div></body>'
  })

Package Sidebar

Install

npm i posthtml-insert

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

2.96 kB

Total Files

3

Last publish

Collaborators

  • ratson