markdown-it / markdown-it-emoji

Emoji syntax plugin for markdown-it markdown parser

Home Page:https://markdown-it.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extending list of emoji mappings instead of replacing

rj33 opened this issue · comments

commented

Is there an easy way to extend the list of emojies without having to feed in an entire new list? I'd like to supplement the light version with a small number of new items, but couldn't find an obvious way of doing that in the current API. Is there something I'm missing, and if not , would it be possible to add an 'extras' param to the available options?

require('markdown-it-emoji/lib/data/light.json') and extend it as you wish.

commented

I'm loading via markdown-it-emoji-light.min.js in the browser without a supported package manager, so that doesn't work so well for my use case, which is why I was hoping for an API method of supplementing the existing list instead of replacing it. In the absence of API support, I guess the easiest method will probably be to rebuild markdown-it-emoji-light.min.js with an updated light.json.

I think it's better to copy data file to your project and modify it as you need. Your request is too specific for api change.