gridsome-plugin-remark-emoji
v1.1.3
Published
Gridsome-compatible (CJS) Emoji transformer plugin for Remark
Downloads
1
Maintainers
Readme
gridsome-plugin-remark-emoji
This is a remark plugin to replace :emoji:
to real UTF-8 emojis in text.
It's a modification of remark-emoji
that strips out all ESM-only dependencies, and allows it to be used with Gridsome as a plugin of gridsome-plugin-remark-container
.
Demo
You can find a demo in the following Codesandbox.
Usage
npm install -s gridsome-plugin-remark-emoji
In your gridome.config.js
:
transformers: {
remark: {
externalLinksTarget: "_blank",
externalLinksRel: ["nofollow", "noopener", "noreferrer"],
anchorClassName: "icon icon-link",
plugins: ["gridsome-plugin-remark-container",
'gridsome-plugin-remark-emoji']
}
Options
options.padSpaceAfter
Setting to true
means that an extra whitespace is added after emoji.
This is useful when browser handle emojis with half character length and following character is hidden.
Default value is false
.
options.emoticon
Setting to true
means that emoticon shortcodes are supported (e.g. :-) will be replaced by 😃).
Default value is false
.
License
Distributed under the MIT License.