Gathering detailed insights and metrics for markdown-it-emoji-mart
Gathering detailed insights and metrics for markdown-it-emoji-mart
Gathering detailed insights and metrics for markdown-it-emoji-mart
Gathering detailed insights and metrics for markdown-it-emoji-mart
npm install markdown-it-emoji-mart
Typescript
Module System
76
Supply Chain
99
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (86.42%)
Makefile (13.58%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
27,241
Last Day
5
Last Week
112
Last Month
396
Last Year
5,820
MIT License
2 Stars
55 Commits
1 Forks
3 Watchers
1 Branches
6 Contributors
Updated on Aug 26, 2021
Minified
Minified + Gzipped
Latest Version
0.1.1
Package Id
markdown-it-emoji-mart@0.1.1
Size
29.13 kB
Cumulative downloads
Total Downloads
Last Day
-58.3%
5
Compared to previous day
Last Week
30.2%
112
Compared to previous week
Last Month
105.2%
396
Compared to previous month
Last Year
16.9%
5,820
Compared to previous year
Plugin for markdown-it markdown parser, adding emoji & emoticon syntax support.
Support emojis from emoji-mart Emoji Picker.
v1.+ requires markdown-it
v4.+, see changelog.
Two versions:
Also supports emoticons shortcuts like :)
, :-(
, and others. See the full list in the link above.
node.js, browser:
1npm install markdown-it-emoji-mart --save 2bower install markdown-it-emoji-mart --save
1var md = require('markdown-it')(); 2var emoji = require('markdown-it-emoji-mart'); 3// Or for light version 4// var emoji = require('markdown-it-emoji-mart/light'); 5 6md.use(emoji [, options]);
Options are not mandatory:
{ name1: char1, name2: char2, ... }
{ "smile": [ ":)", ":-)" ], "laughing": ":D" }
Differences in browser. If you load the script directly into the page without
using a package system, the module will add itself globally with the name markdownitEmoji
.
Init code will look a bit different in this case:
1var md = window.markdownit().use(window.markdownitEmoji);
By default, emojis are rendered as appropriate unicode chars. But you can change the renderer function as you wish.
Render as span blocks (for example, to use a custom iconic font):
1// ... 2// initialize 3 4md.renderer.rules.emoji = function(token, idx) { 5 return `<span class="emoji emoji_${token[idx].markup}">${token[idx].content}</span>`; 6};
1.emoji { 2 font-size: 1.2em; 3}
Or use twemoji:
1// ... 2// initialize 3 4var twemoji = require('twemoji') 5 6md.renderer.rules.emoji = function(token, idx) { 7 return twemoji.parse(token[idx].content); 8};
NB 1. Read twemoji docs! In case you need more options to change image size & type.
NB 2. When using twemoji you can make image height match the line height with this style:
1.emoji { 2 height: 1.2em; 3}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
62 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More