# All Demos

The following demos are provided to show how to use Emoji One to its fullest potential. Feel free to dig in and take these demos apart to see how it all works.

Note: As of version 1.4.1 the PHP library syntax has changed. The previous syntax is still in place for backward compatibility but will be removed at a later date.

### Javascript Conversion

- .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.

### PHP Conversion (recommended)

- 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.

### Extras

- Shortname Autocomplete

  Easily add shortname autocomplete functionality to any text input on your page.

- ASCII Smiley Conversion

  With one quick step you can start converting common ASCII smileys to their corresponding images.

- Alternate Alt Tags

  Change from the native unicode emoji in the resulting alt tags to their shortnames insteads.

- Live Preview Box

  Display converted Emoji in a preview box as the user is typing.

- Conversion HTML Class

  Stick a class of .convert-emoji on any HTML element and automatically convert native unicode emoji and/or shortnames to images after page load.

- Convert on Form Submission

  Converts unicode input to shortnames once the user submits the form.

- Sprites (PNG)

  With an additional CSS file you can use Emoji One as resizeable PNG sprites (up to 64x64).

- Sprites (SVG)

  This sprite method requires no extra CSS, and is infinitely resizeable.