
- #Emoji in textbar update#
- #Emoji in textbar full#
If my users want to use the text versions, then they may, but I really find the yellow faces to lower things to a less sophisticated level than I want to create. Aren't there any English teachers out there who want their students to be able to learn to compose in proper English without resorting to smileys? I personally would like to be able to disable these ugly yellow faces myself. I am surprised that no one has complained about this being built in before. As students can choose to use smileys through the html editor.
I added a vanity alias for my favorite emoji, because I can never remember what it’s called.This is definitely a Moodle issue.
Some are repeats, like :tangerine:, :orange:, and :mandarin: 🍊
There are 1462 emoji keywords total on Medium. My first push of emojiKeywords.js failed lint checks, because you can’t have duplicate keys in an object, and there were two turkeys 🦃 🇹🇷 (now :turkey: and :turkey_flag:). For non-🍏 machines, we’ll provide the base set (everything pre–El Capitan). So, those are the version cut-offs I’m going with. After a bit, Sierra (10.12.2), along with iOS 10.2, adds support for Unicode 9. Sierra (10.12) comes out at the same time as iOS 10, with a bunch of new emoji that don’t really map to any Unicode version, and are largely differently-gendered versions of existing emoji. #Emoji in textbar update#
There is an emoji update with El Capitan (10.11.1), which corresponds to iOS 9.1 and adds support for Unicode 7 and 8.There are two OS X updates that just add more flags.At some point in the distant past (~OS X Lion), emoji support is introduced.Going off a hodgepodge of release notes, iOS rumors, and old Stack Overflow answers, I cobbled together the following timeline: I kept an eye out for macOS emoji support documentation, but didn’t find much. For ease of searching (and smaller file size), I massaged that list into an object of alias → emoji pairs.
I ended up cannibalizing the keywords available on Github, found here. :smiling_face_with_open_mouth_and_tightly_closed_eyes:, for instance, which I and most other emoji-capable humans know as :laughing: 😆 I initially tried using canonical unicode names, but there are some really bizarre ones.
#Emoji in textbar full#
I then proceeded to spend two full days looking through different sets of emoji keywords, and trying to figure out which emoji are supported by which macOS versions. In a testament to the cleanliness of Medium’s editor code, everything I described above took me about five hours to do, unit tests and all. TokenCommand = function (keyword, emoji) Keywords We find the preceding colon, remove it and everything between it and the cursor, and then insert the selected emoji.
tokenCommand, which does the actual keyword → emoji replacement when a typeahead item is selected. So we just take the raw data straight from requestData and return it. We don’t need this, because we didn’t send a request. extractData, which by default tries to unpack a response with a value key. For emoji, we just wrap a call to emoji.getMatchingEmoji in a Deferred. For user mentions, we send a request to our backend. requestData, which happens when shouldLookup is true. shouldLinkify additionally checks if the query markup is already there, so we don’t add it twice. Both are checked on most keypresses, and both look for a colon preceding the cursor, with no spaces or punctuation in between. shouldLookup, which determines whether we do a query, and shouldLinkify, which determines if we try to add the query markup. (That’s what turns the text green as you type.) linkif圜ommand and unlinkif圜ommand, which add and remove the temporary HTML markup we put on :query strings. So I created a new class called TypeaheadEmojiPlugin, and overrode the following methods: Each one is its own editor plugin, but they all extend the root TypeaheadPlugin. (Like typeaheads!)Ī few typeaheads already exist in the editor, including the ones for and post tags. They also sometimes draw other editor UX. The Medium editor has a bunch of plugins, which translate key and mouse input into editor commands. We even gracefully handle multi-character emoji like 👨👩👦👦 and 🇦🇺 when you backspace and arrow around. We already implicitly allow emoji in the editor.
Try it out! Type a colon, followed by the name of your favorite emoji into any Medium post. Last week I was blocked on product development, so I added an :emoji: typeahead to the Medium editor, because I was tired of ^⌘ing.