In user-generated posts, I have many raw emojis like
<p>I ❤ your post!</p>
I'm wondering what is the best way to replace these emojis with colorful emojis like:
<p>I <i class="twa twa-heart">❤️</i> your post!</p>
I'd like to style the emojies with twemoji library.
You might ask why not let users insert the styled emojis at the first place while picking the emojis? The answer is that the interface's text editor is not WYSIWYG and the user posts are heavily stripped. So such option is ruled out and I'm looking for a solution that does this conversion at render time.