Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
Version 4.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyahenson committed Aug 29, 2018
1 parent 85ee3ed commit d626d5a
Show file tree
Hide file tree
Showing 35 changed files with 24,605 additions and 8,333 deletions.
4 changes: 2 additions & 2 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
We've teamed up with [JSDelivr](http://www.jsdelivr.com/#!emojione) 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="https://cdn.jsdelivr.net/npm/emojione@3.1.7/lib/js/emojione.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/emojione@3.1.7/extras/css/emojione.min.css"/>
<script src="https://cdn.jsdelivr.net/npm/emojione@4.0.0/lib/js/emojione.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/emojione@4.0.0/extras/css/emojione.min.css"/>
```

Quick installs can also be done using NPM and Bower (for the Javascript toolkit) or Composer (for the PHP toolkit). **If you wish to serve image assets locally you'll need to install [emojione-assets](https://www.github.com/emojione/emojione-assets) and include the pngs and/or sprites into your project.** Many of our [demos](https://demos.emojione.com/latest/) use assets locally simply by pointing the `imagePathPNG` variable to your local asset location.
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ A set of libraries to help users find and replace native system emojis with Emoj

## License to Use EmojiOne Images

### EmojiOne Version 3
### EmojiOne Version 4
EmojiOne Version 4 is available under the same licensing structure as Version 3. Please see below for more details.

### EmojiOne Version 3+

EmojiOne launched version 3.0 in 2017, which has several licensing options available. PNG 32px, 64px, and 128px as well as 32px and 64px sprites are available for digital use, with attribution. See [emojione.com/developers/free-license](https://www.emojione.com/developers/free-license) for more information on usage and attribution requirements.

Expand Down
8 changes: 5 additions & 3 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Upgrading from emojione v2 to emojione v3
# Upgrading from emojione v2 to emojione v3+

* emojione v3 brings about several breaking changes and new considerations
* emojione v3 brought about several breaking changes and new considerations
* please review EmojiOne Licensing for more information on using SVG or PNG (larger than 128px) assets

## Libraries
Expand All @@ -15,6 +15,7 @@
- blacklistChars (bool)
- spriteSize (str)
- riskyMatchAscii (bool)
- fileExtension (str)

**PHP**
- Deprecated vars:
Expand All @@ -27,6 +28,7 @@
- blacklistChars (str)
- spriteSize (str)
- riskyMatchAscii (bool)
- fileExtension (str)
- Tests
- [tests/ConversionTest.php] removed testSmileyInsideAnObject()
- [tests/ConversionTest.php] removed testShortnameInsideOfObjectTag()
Expand All @@ -53,7 +55,7 @@ Replaced by ‘examples’. Contains code snippets of each of the functions prev
- **genders** (array) contains the base code points of the gender children for a gender parent (gender-neutral, gender base)
- **unicode** (str) and **unicode_alt** (str) are depricated. code points are now organized within **code_points** (array)
- **base** (str) is identical to the primary key
- **fully_qualified** (str) represents code point according to [this Unicode documentation](http://unicode.org/Public/emoji/5.0/emoji-test.txt)
- **fully_qualified** (str) represents code point according to [this Unicode documentation](http://unicode.org/Public/emoji/11.0/emoji-test.txt)
- **non_fully_qualified** (str) derived from same documentation as FQ. NFQ code point convention is used for PNG file names in font file builds
- **output** (str) is the recommended code point to use for conversion to native unicode
- **match_default** (array) contains one or more code points used to identify native unicode
Expand Down
9 changes: 1 addition & 8 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Both PHP and JavaScript libraries now have wider range of available properties.
- `emojiVersion` (str) - Used only to direct CDN path. This is a 2-digit version (e.g. '3.1'). Not recommended for usage below 3.0.0.
- `emojiSize` (str) **Default: `32`** - Used only to direct CDN path for non-sprite PNG usage. Available options are '32', '64', and '128'.
- `imagePathPNG` (str) - Defaults to CDN (jsdelivr) path. Setting as alternate path overwrites `emojiSize` option.
- `fileExtension` (str) - Defaults to .png. Set to '.svg' if using premium assets (.svg) locally.
- `greedyMatch` (bool) **Default: `false`** - When `true`, matches non-fully-qualified Unicode values.
- `blacklistChars` (str) **Default: `''`** - Comma-separated list of characters that should not be replaced. For example, setting to `'#,*'` ensures pound and asterisk symbols are not replaced.
- `imageTitleTag` (bool) **Default: `true`** - When `false`, removes title attribute from <img> tag.
Expand All @@ -33,10 +34,6 @@ This demo shows you how to take native unicode emoji input, such as that from yo

This demo shows you how to take input containing only shortnames and translate it directly to EmojiOne images. (when displaying the unified input to clients)

**[.unicodeToImage\(str\)](https://demos.emojione.com/latest/jsunicodetoimage.html)** - _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 EmojiOne images. (would be great for a live editor preview)

**[.toImage\(str\)](https://demos.emojione.com/latest/jstoimage.html)** - _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 EmojiOne images for display.
Expand All @@ -54,10 +51,6 @@ This demo shows you how to take native unicode emoji input, such as that from yo

This demo shows you how to take input containing only shortnames and translate it directly to EmojiOne images. (when displaying the unified input to clients)

**[unicodeToImage\($str\)](https://demos.emojione.com/latest/phpunicodetoimage.php)** - _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 EmojiOne images. (would be great for a live editor preview)

**[toImage\($str\)](https://demos.emojione.com/latest/phptoimage.php)** - _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 EmojiOne images for display.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "emojione",
"version": "3.1.7",
"version": "4.0.0",
"main": [
"extras/css/emojione.css",
"lib/js/emojione.js"
Expand Down
2 changes: 1 addition & 1 deletion emoji.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion emoji_strategy.json

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions examples/JAVASCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,6 @@ function convert() {

----------

## .unicodeToImage(str)
*Convert Native Unicode Emoji Directly to Images*

If you have native unicode emoji characters that you want to convert directly to images, you can use this function. It should be noted that once your input text has been converted to images it cannot be converted back using the provided functions.

>For that reason, we recommend only converting input text to images when it's ready to display to the client. The better alternative, in our opinion, is to convert native unicode emoji to their corresponding shortname using **.toShort(str)** for database storage.
**HTML:**
`<input type="button" value="Convert" onclick="convert()"/>`

**Javascript Snippet**
```javascript
function convert() {
var input = document.getElementById('inputText').value;
var output = emojione.unicodeToImage(input);
document.getElementById('outputText').innerHTML = output;
}
```

----------

## .shortnameToUnicode(str)
*Convert Shortnames to Native Unicode*

Expand Down
29 changes: 0 additions & 29 deletions examples/PHP.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,6 @@ if(isset($_POST['inputText'])) {

----------

## unicodeToImage($str)
*Convert Native Unicode Emoji Directly to Images*

If you have native unicode emoji characters that you want to convert directly to images, you can use this function. It should be noted that once your input text has been converted to images it cannot be converted back using the provided functions.

>For that reason, we recommend only converting input text to images when it's ready to display to the client. The better alternative, in our opinion, is to convert native unicode emoji to their corresponding shortname using **toShort($str)** for database storage.
**PHP Snippet**
```php
namespace Emojione;

// include the PHP library (if not autoloaded)
require('./../lib/php/autoload.php');

$client = new Client(new Ruleset());

// ###############################################
// if you want to host the images somewhere else
// you can easily change the default paths
$client->imagePathPNG = './../assets/png/'; // defaults to jsdelivr's free CDN
// ###############################################

if(isset($_POST['inputText'])) {
echo $client->unicodeToImage($_POST['inputText']);
}
```

----------

## shortnameToUnicode($str)
*Convert Shortnames to Native Unicode*

Expand Down
Loading

0 comments on commit d626d5a

Please sign in to comment.