neutronX / django-markdownx

Comprehensive Markdown plugin built for Django
https://neutronx.github.io/django-markdownx/
Other
863 stars 153 forks source link

Implement Emojis #91

Open alzearafat opened 7 years ago

alzearafat commented 7 years ago

Hi

Is there any way I can implement Emojis? Any help/clue would be greatly appreciated

Thanks!

adi- commented 7 years ago

„Not supporting emoji seems like a pretty cool feature to me” 😸

adi- commented 7 years ago

Are you thinking of a plugin or just want some tips to implement emojis for your project?

alzearafat commented 7 years ago

Haha I feel you, some people can't stand emojis 😁 It's just nice if we can add emojis as option, because some people still like it... 😬

Are you thinking of a plugin or just want some tips to implement emojis for your project?

Which is easier to implement? I already doing some research about implement it in markdown/django, like this one and this one also but I'm still lost...

Anyway, thanks @adi- !

xenatisch commented 7 years ago

We can certainly think about it.

The thing is, MarkdownX is not a markdown interpreter, nor is it a WYSWIG editor. It is a medium between the front-end HTML element used for writing Markdown, and a backend interpreter that converts that markdown to HTML.

The aim is to provide the uttermost flexibility; so if you want to use emojis, you can either implement it yourself, or be able to use an existing interpreter that already has the functionality.

So essentially, what you need is a markdown interpreter that supports emojis; like the one that GitHUB uses.

Most emojis are now included in the unicode standard, so all you have to do is to include a unicode number, and your browser will render it. Of course that's difficult for the end user, but then to change it, we will need a markdown interpreter which recognises specific emoji keywords and converts them to their respective unicode numbers. Writing an add-on for an existing interpreter sounds like a good idea. Regex the code, replace the keywords you already have a in a dict / JSON, and you get yourself an emoji-supporting interpreter... :smile: