1.0.0 • Published 9 months ago

remark-flucent-emoji v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

remark-flucent-emoji

This is a remark plugin to replace :emoji: to Microsoft team's animated flucent emoji.

usage

remark().use(remarkFlucentEmoji);
import { remark } from 'remark';
import remarkFlucentEmoji from 'remark-flucent-emoji';

const doc = 'flucent emoj 😺:+1:';
const processor = remark().use(remarkFlucentEmoji);
const file = await processor.process(doc);

console.log(String(file));
// => flucent emoj <img src="https://raw.githubusercontent.com/ywbird/flucent-emoji-animated-unicode/main/assets/1f63a.png" alt="😺" title="fc-emoji"> <img src="https://raw.githubusercontent.com/ywbird/flucent-emoji-animated-unicode/main/assets/1f44d.png" alt="👍" title="fc-emoji">

CSS

Add following to global.css

img[title='fc-emoji'] {
    height: 1.3em;
    pointer-events: none;
    display: inline-block;
    translate: 0 25%;
}

Related