remark-html-emoji-image
v1.0.0
Published
Transform emoji unicodes into html images
Downloads
60
Readme
remark-html-emoji-image
remark plug-in to transform emoji unicodes into html images
Installation
npm:
npm install remark-html-emoji-image
Usage
var remark = require('remark');
var htmlEmojiImage = require('remark-html-emoji-image');
var doc = remark()
.use(htmlEmojiImage, {base: 'https://example.com/'})
.processSync('😄 👍')
.toString();
console.log(doc);
Yields:
![](https://example.com/smile.png ":smile:") ![](https://example.com/+1.png ":+1:")
API
remark().use(htmlEmojiImage[, options])
Transform emoji unicodes into html images (like 😄 into
![](http://example.com/smile.png ":smile:")
).
options.base
string
— Required base URL to use for emoji images.
options.extname
string
, default: .png
— Optional extension (with dot) to use after
the emoji name.