emoji-fixer
v0.0.12
Published
A simple lightweight library which fixes uncolored emojis (black and white) caused in headline tags and bold fonts
Downloads
8
Readme
Emoji-Fixer
This lightweight javascript library allows you to fix emojis that appear without any color (black and white) because of bold 'font-weight' css property.
This "bug" only takes affect on Windows operation systems.
Example of emoji fixing
An example of grayscaled emojis:
After the emoji-fixer
library:
How to use this library
You can have a look at the examples
directory to see an example of using this library.
Using this library as a node_module (for webpack)
Simply install the library:
$ npm install emoji-fixer
After that you can simply add the following line of code to fix all emojis for your body
tag:
// Import the emoji-fixer lib
const fixEmojis = require('emoji-fixer').default;
// Fixes all of the emojis for the entire document
fixEmojis('body');
Using this library in your HTML\Javascript directly
Method 1:
// Import the emoji-fixer lib
import fixEmojis from 'https://cdn.jsdelivr.net/npm/emoji-fixer';
// Fixes all of the emojis for the entire document
fixEmojis('body');
Method 2:
<script type="text/javascript">
// Import the emoji-fixer lib async
import('https://cdn.jsdelivr.net/npm/emoji-fixer').then(fixEmojis => {
// Fixes all of the emojis for the entire document
fixEmojis.default('body');
});
</script>