Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 487 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 487 Bytes

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>'
  })