Unicode Characters/Emojis
-
Hi,
I really appreciate you for creating this plugin but I was having a problem with it using svg images instead of unicode emojis. The reason is because I use the plugin custom smilies (yeah it still works even though it hasn’t been updated for a while) and have been using unicode to produce my custom smilies over the default unicode emojis.
Your plugin kept pasting images instead of the unicode meaning this wouldn’t work with my custom smilies.
So I made a few modifications to blocks.build.js
I changed:
getOptionLabel:function(e){var o=e.codes,a=e.char,r=e.name;return wp.element.createElement("span",null,wp.element.createElement("img",{className:"emoji",alt:a,src:"https://s.w.org/images/core/emoji/12.0.0-1/svg/"+o.toLowerCase()+".svg"})," ",r)},getOptionCompletion:function(e){var o=e.char,a=e.codes;return wp.element.createElement("img",{draggable:"false",className:"eedee-emoji",alt:o,src:"https://s.w.org/images/core/emoji/12.0.0-1/svg/"+a.toLowerCase()+".svg"})}to:
getOptionLabel:function(e){var o=e.codes,a=e.char,r=e.name;return wp.element.createElement("span",null,a," ",r)},getOptionCompletion:function(e){var o=e.char,a=e.codes;return o}This has completely fixed my issue and I hope you consider this for your next update as it’s better than relying on a remote url that may not work in the future (which would break all the posts/pages with these emotions).
The topic ‘Unicode Characters/Emojis’ is closed to new replies.