Skip to content

eirikhm/web-emoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You should check out emojione at https://github.com/Ranks/emojione

web-emoji

This project brings emoji support for websites and mobile web applications.

The general idea is to let server-side code deal with all things unicode. The clients pass over the emojis, while the server replaces all 🍺 with 🍺. This makes it easier to store text in databases (no need to deal with utf8-mb4), and UTF-16 in JS for example.

The clients are responsible for replacing 🍺 with something that looks like a beer (usually an image).

PS: If you are seeing some square boxes (test: 🍺) in Chrome on OSX, try Safari. PHP

The PHP class supports conversion from emoji to 🍺, and from 🍺 HTML tag with appropriate image.

$e = new Emojificator('data/');
$e->emoji2text("Are you up for a 🍺?"); // Are you up for a :beer:?
$e->text2html("Are you up for a :beer:?"); // Are you up for a HTML-TAG

JavaScript

Converts 🍺 to HTML tags with appropriate image

Emoji.text2Html("Are you up for a :beer:?"); // Are you up for a HTML-TAG

Worth reading

http://crocodillon.com/blog/parsing-emoji-unicode-in-javascript http://stackoverflow.com/questions/7814293/how-to-insert-utf-8-mb4-characteremoji-in-ios5-in-mysql

About

Emojo support for websites and mobile web applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published