https://github.com/tylingsoft/markdown-it-icon
Deprecated. Emoji icons, Font awesome icons and Ionicons icons for markdown-it.
https://github.com/tylingsoft/markdown-it-icon
Last synced: about 1 year ago
JSON representation
Deprecated. Emoji icons, Font awesome icons and Ionicons icons for markdown-it.
- Host: GitHub
- URL: https://github.com/tylingsoft/markdown-it-icon
- Owner: tylingsoft
- Created: 2015-11-14T05:19:05.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-03T06:15:15.000Z (over 9 years ago)
- Last Synced: 2025-03-28T07:16:45.166Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 89.8 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markdown-it-icon
Emoji icons, Font awesome icons and Ionicons icons for markdown-it.
## Deprecated in favor of [markdown-it-icons](https://github.com/tylingsoft/markdown-it-icons)
## Install
`npm install markdown-it-icon --save`
## Usage
```javascript
mdc = mdc.use(require('markdown-it-icon'));
var emojione =require('emojione');
emojione.cacheBustParam = ''; // change this to invalidate emojione icons cache
emojione.imagePathPNG = 'https://cdn.jsdelivr.net/emojione/assets/png/';
mdc.renderer.rules.emoji = function(tokens, idx) {
var shortname = tokens[idx].markup;
if(shortname.startsWith('fa-')) { // fontawesome
return '';
}
if(shortname.startsWith('ion-')) { // ionicons
return '';
}
return emojione.shortnameToImage(':' + shortname + ':'); // emojione
};
```
## Syntax
### Emoji icons
`:panda_face:`
### Font awesome icons
`:fa-cog:`
### Ionicons icons
`:ion-social-tux:`
## License
MIT