django-machina icon indicating copy to clipboard operation
django-machina copied to clipboard

Emojis in django-machina

Open savelmtr opened this issue 5 years ago • 0 comments

Hello there! I'm building a project based on django-machina. In my forum I wanted to have emojis because users love them. So I've added to my javascript file this function for the "Emojis" button in EasyMDE: check it on pastebin

Also in constructor for new instance of the editor the button for emojis: check it on pastebin

You've probably noted that I've used custom style for this button. Here all of them is in Stylus lang: check it on pastebin I also notice that I use Awesome font for this new button. For my emojis I selected NotoColorEmoji font by Google. You also can download it from it's repo on Github.

At last emojis in posts have to be rendered as emojis, you know. For this purpose i've made little renderer in JS. check it on pastebin.

I hope that my experience was useful for this project. May be the part of wrapping emojis into span's is more clever to be done in Python? For example, we can add such code into renderer of markdown. I don't know if it is real need.

And thanks for this app! Amazing thing.

savelmtr avatar Nov 08 '19 22:11 savelmtr