Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Emoji One is a complete set of emojis designed for the web. It includes libraries to easily convert unicode characters to shortnames (:smile:) and shortnames to our custom emoji images. PNG and SVG formats provided for the emoji images.
bringing you emojione.com & emoji.codes
The web's first and only complete open source emoji set. It is 100% free and super easy to integrate.
To standardize emoji on the web through the use of common :shortnames:.
When storing user inputted text in your database, say from a guestbook or through a CMS admin, you should always make sure you are storing text containing only :shortnames: and not Unicode emoji characters or emoji images. Then, when you are displaying that content to the user, you can convert it server-side with the PHP toolkit provided, or client-side using the Javascript toolkit which is also provided. Demos of this process using Javascript, jQuery, and PHP are included in the repo, and we have example code snippets below.
Shortnames are semi-standardized human-readable identifiers for each emoji icon. Many online web applications will accept these shortnames as alternatives for the actual unicode character. We've compiled the full list over at emoji.codes with quick copy & search functions.
We've teamed up with JSDelivr to provide a simple way to install these emoji on any javascript-enabled website. Add the following script and stylesheet links to the head of your webpage:
<script src="//cdn.jsdelivr.net/emojione/1.5.1/lib/js/emojione.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/emojione/1.5.1/assets/css/emojione.min.css"/>
Alternatively, CDNjs is also available as a CDN Host for Emoji One.
Quick installs can also be done using NPM and Bower (for the Javascript toolkit) or Composer (for the PHP toolkit).
> npm install emojione
> bower install emojione
$ composer require emojione/emojione
meteor add emojione:emojione
Below there are some examples of how you will actually use the libraries to convert Unicode emoji characters to :shortnames: and :shortnames: to emoji images.
.toShort(str) - native unicode -> shortnames
This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it to their corresponding shortnames. (we recommend this for database storage)
.shortnameToImage(str) - shortname -> images
This demo shows you how to take input containing only shortnames and translate it directly to Emoji One images. (when displaying the unified input to clients)
.unicodeToImage(str) - native unicode -> images
This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it directly to Emoji One images. (would be great for a live editor preview)
.toImage(str) - native unicode + shortnames -> images (mixed input)
This demo shows you how to take input containing both native unicode emoji and shortnames, and translate it into Emoji One images for display.
toShort($str) - native unicode -> shortnames
This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it to their corresponding shortnames. (we recommend this for database storage)
shortnameToImage($str) - shortname -> images
This demo shows you how to take input containing only shortnames and translate it directly to Emoji One images. (when displaying the unified input to clients)
unicodeToImage($str) - native unicode -> images
This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it directly to Emoji One images. (would be great for a live editor preview)
toImage($str) - native unicode + shortnames -> images (mixed input)
This demo shows you how to take input containing both native unicode emoji and shortnames, and translate it into Emoji One images for display.
::toShort($str) - native unicode -> shortnames
This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it to their corresponding shortnames. (we recommend this for database storage)
::shortnameToImage($str) - shortname -> images
This demo shows you how to take input containing only shortnames and translate it directly to Emoji One images. (when displaying the unified input to clients)
::unicodeToImage($str) - native unicode -> images
This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it directly to Emoji One images. (would be great for a live editor preview)
::toImage($str) - native unicode + shortnames -> images (mixed input)
This demo shows you how to take input containing both native unicode emoji and shortnames, and translate it into Emoji One images for display.
My emoji {{> emojione ':beers:'}} text.
Or
{{#emojione}}My emoji :beers: text.{{/emojione}}
Easily add shortname autocomplete functionality to any text input on your page.
With one quick step you can start converting common ASCII smileys to their corresponding images.
Change from the native unicode emoji in the resulting alt tags to their shortnames instead.
Display converted Emoji in a preview box as the user is typing.
Stick a class of .emojione-convert on any HTML element and automatically convert native unicode emoji and/or shortnames to images after page load.
Converts unicode input to shortnames once the user submits the form.
With an additional CSS file you can use Emoji One as resizable PNG sprites (up to 64x64).
This sprite method requires no extra CSS, and is infinitely resizable.
If you're getting serious about implementing emoji into your website, you will want to consider your web stack's character encoding. You should make sure that all connection points are using the same encoding. There are a lot of options and configuration possibilities here, so you'll have to figure what works best for your own situation.
A quick Google search will bring up a lot of information on how to get your entire web stack to use UTF-8, which is needed to properly handle Unicode emoji.
To get you started, here's a nice guide: UTF-8: The Secret of Character Encoding.
If you discover any bugs, feel free to create an issue on GitHub. We also welcome the open-source community to contribute to the project by forking it and issuing pull requests.
If you have any questions, comments, or concerns you are welcome to contact us.
We sincerely hope that you choose to use Emoji One and support our project, but if you feel like it's not for you, please have a look at these possible alternatives:
FAQs
EmojiOne is a complete set of emojis designed for the web. It includes libraries to easily convert unicode characters to shortnames (:smile:) and shortnames to our custom emoji images. PNG formats provided for the emoji images.
We found that emojione demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.