https://github.com/ratson/posthtml-insert
PostHTML plugin to insert content after HTML tag.
https://github.com/ratson/posthtml-insert
html posthtml posthtml-plugin
Last synced: about 1 year ago
JSON representation
PostHTML plugin to insert content after HTML tag.
- Host: GitHub
- URL: https://github.com/ratson/posthtml-insert
- Owner: ratson
- Created: 2017-11-23T15:00:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T14:48:15.000Z (almost 7 years ago)
- Last Synced: 2025-03-18T12:15:12.883Z (about 1 year ago)
- Topics: html, posthtml, posthtml-plugin
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# posthtml-insert
PostHTML plugin to insert content after HTML tag.
## Installation
```
npm install posthtml-insert --save
```
## Usage
```js
const posthtml = require('posthtml')
const insert = require('posthtml-insert')
posthtml([insert({ selector: 'body', content: '
test' })])
.process('')
.then(({ html }) => {
console.log(html)
// => 'test'
})
```