Open aravindet opened 9 years ago
There are 2 possible ways:
inline
chain.typographer
chain.All depends on priority you need to get. Both will work.
About options - you can leave typographer settings intact, and pass options directly to plugin on .use()
call. Also, not principal.
In general, you understand right.
Hm... may be i missed something. Do you wish to implement this as plugin or as core feature? List of emojy names is quite big, and will cause noticeable core grow. I think, it's better to do it as plugin. That's discussable.
Note2:
:)
, :(
and so on.I’m thinking of adding it to the typographer. Comments?
my 2c is that a plugin would be best for this. Too big to add to the core. Would be awesome to see though!
I think, these 2 params needed:
If not set - use defaults.
Okay, I’ll explore making this a plugin. Sticking to unicode also seems to be a good idea.
Is there an example plugin somewhere that I can look at?
Not yet, sorry. Something like this:
module.exports = function(md, options) {
md.typographer.ruler.after(function emoji(...) { ... });
md.renderer.rules.emoji = function (...) { ... };
}
For rule source take a look at linkifier, it does something similar - split text tokens and insert new one between.
going off on a tangent... if this is going to be a plugin that's not included in this repository, it would be great if both this repo and all its "official" plugins were in its own github organization. i love the contribution activity in this repo and hope to have it be consistent across all plugins.
yeah I agree, although I don't know yet if we plan on having official plugins - just haven't had time to think about it yet lol.
I was hoping to get the remarkable org when we started this, since there was no activity for over two years, then this month all of a sudden some commits happened. https://github.com/remarkable.
@jonathanong if you come up with ideas/names for an org, feel free to create an issue to get discussion going around it. not sure what @puzrin's thoughts are.
I don't think that after we finish planned extentions from pending list, here remain big activity with zillions of plugins, like for grunt. All endless ass pain in other trackers is around the same things - broken rules / sub / sup / footnotes / abbrs / todos. Once been done 99% of problems disapper.
I could include basic emojis support in core, by this principle:
So, couple questions to all:
For example, 5-10 similes are enougth for my needs. But you can have different cases.
I love the idea of emojis, but I still think this is best as a plugin.
A couple of good projects:
Twitter just open sourced: https://github.com/twitter/twemoji a few hours ago.
Twitter just open sourced: https://github.com/twitter/twemoji a few hours ago.
Nice, & hosted with MaxCDN!
I'd think translating MD into generic Unicode, then having an additional plugin to render the Unicode into what ever icon set is most flexible.
Agreed, it seems that every user will have different emoji they prefer using, so only full support will be satisfactory. so I love the idea of this being a plugin. Not sure if I or we have the bandwidth to officially support that though
http://www.emoji-cheat-sheet.com/ - memo from wish list.
@jonschlinkert Would you consider what we did with gulp? http://gulpjs.com/plugins/ https://github.com/gulpjs/plugins
@stevelacy absolutely! would love to
I’d like to build the emoji feature. It will work similar to linkify or replace, so I’m thinking of adding it to the typographer. Comments?
Also, an option to let users switch between images and unicode in the output, and to specify the path prefix for loading images, will be needed. I suggest:
Is this okay?