Code Monkey home page Code Monkey logo

minemoji's Introduction

minEmoji Collection

Old JavaScript/CSS libraries and jQuery Plug-ins to convert Emojis into CSS Sprite images using <span> and <img> elements.

IMPORTANT

This repo is no longer maintained in favor of the new emoji library, is simpler, lighter and faster:

Previous Version

minEmoji_iOS10 Demo

Older versions

jMinEmoji2 Demo
minEmoji_iOS8 Demo
jMinEmoji-SVG Demo Some SVGs are not available.
jMinEmoji Demo
minEmoji Demo

Special Notes:

  1. jMinEmoji-SVG doesn't have all assets available on the latest iOS / OS X release, but Emoji One devs will release a new version soon.
  2. Missing emojis on unfinished sprites are replaced with Apple emojis.
  3. If you use TweetDeck.com and want all new emojis, use this fork I made from Better TweetDeck which uses minEmoji in order to replace and input emojis.

jMinEmoji2 jQuery plugin:

iOS 9.1 ready, a simple solution using PNG Sprites, usage: Include the CSS and JS into your HTML and apply the minEmoji() function to any jQuery selector.

<link href="css/minEmoji2.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="js/jMinEmoji2.js"></script>
<script>
	$(function(){
		$('.txt').minEmoji();
	});	
</script>

iOS and Apple Devices: jMinEmoji doesn't replace Emoji on Safari, but you can force that behavior passing true to the function:

$(function(){
	$('.txt').minEmoji(true);
});

jMinEmoji-SVG jQuery plugin:

The jMinEmoji-SVG jQuery plugin is the perfect solutions for HiDPI displays, low bandwidth consumption; 127 bytes on CSS, 17.41KiB (not using gzip) on JavaScript, loading emojis on demand from very small numerically named SVG files.

Usage: Include the CSS and JS into your HTML and apply the minEmojiSVG() function to any jQuery selector.

<link href="css/jMinEmoji-SVG.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="js/jMinEmoji-SVG.min.js"></script>
<script>
	$(function(){
		$('.txt').minEmojiSVG();
	});	
</script>

iOS and Apple Devices: jMinEmoji-SVG doesn't replace Emoji on Safari, but you can force that behavior with the safari: true option:

$(function(){
	$('.txt').minEmojiSVG({ 
		safari:		false, 		// Force emoji replacement on Safari
		svg_path:	'img/svg/'	// Set the SVG image path
	});
});

jMinEmoji jQuery plugin:

A simple solution using PNG Sprites, usage: Include the CSS and JS into your HTML and apply the minEmoji() function to any jQuery selector.

<link href="css/minEmoji.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="js/jMinEmoji.js"></script>
<script>
	$(function(){
		$('.txt').minEmoji();
	});	
</script>

iOS and Apple Devices: jMinEmoji doesn't replace Emoji on Safari, but you can force that behavior passing true to the function:

$(function(){
	$('.txt').minEmoji(true);
});

minEmoji:

For those who like to code without jQuery, usage: Include the CSS and JS into your HTML document and call the function minEmoji(string) to replace a desired text.

<link href="css/minEmoji.css" rel="stylesheet">
<script src="js/minEmoji.js"></script>
<script>
	$('#div').html(minEmoji(string));	
</script>

Why another library?

Here is a post with the huge emoji image source files and full explanation: http://rodrigopolo.com/codigo/minemoji-another-emoji-js-library.html


License

(The MIT License)

Copyright (c) by Rodrigo Polo http://RodrigoPolo.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Emoji One assets License

Attribution required, use one of the following:

Twitter Emoji assets License

Copyright 2014 Twitter, Inc and other contributors Graphics licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/


Donations

PayPal

minemoji's People

Contributors

bryant1410 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minemoji's Issues

Re-convert image tags to emoji for inputs.

Hello,

Thanks for your good job. I want to ask you that how can i convert back image tags to emoji for editing databases values in form inputs?

I insert the emojis to database; but when a user wants to edit it; input text show <img src=emoji/1fe2n.png .... > etc. I have to show emojis in the form input.

What is your suggestion for this?

Thanks.

"is_safari" check recognizes PhantomJS as Safari

In my webapp I am using jMinEmoji2. To test my webapp I am using Jasmine, a behavior-driven development framework for testing JavaScript code.

Jasmine is executed by PhantomJS, a headless WebKit browser. In my tests I was checking if Emojis are correctly replaced by the minEmoji library (with code like '<span class="em emj115"></span>') but I realized that they are not replaced.

When checking the minEmij code, I saw that it tests if a browser is a Safari browser, to not replace Emojis on Apple devices. But unfortunately PhantomJS uses the user agent Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.8 Safari/534.34, which is recognized as Safari.

Therefore I suggest to exclude PhantomJS from the is_safari check.

Update the SVG's

Hello,
great library! I like and use it!

Are u thinking about to update the list of svg's? There are still some missing.

Cheers
Oliver KK

The sprite could be smaller easily

Hi!

As you mentioned in the readme of jMinEmoji2, the sprite is quite big. 950K is too much especially for mobile sites.

Luckily the size of that emoji.png can be easily reduced just by recompressing it. I've been using tinypng.com for a while now, and they reduced the size from 950K to 212K, but you can use anything that works for you :)

Please create release version

It would be nice if you could provide versions in the future, so that i can point to a specific version in my bower file.

NPM / NodeJS version?

Hi!
Is it possible to use this library server side, in NodeJS?
And it would be nice if it was added to NPM for that?

Android generator

Hi, is it possible for you to provide a new version to generate a png sheet with Android emojis? The one in sprite_gen makes a 7 column sheet, and the order of the emojis is different. I see you have a valid sheet in minEmoji/img/ but that one is missing a lot of emojis (they are replaced with their Apple counterpart I think). I tried to adapt your last version (3) but I failed miserably.

Thanks, and I understand if you are too busy to do it.

Determining codepoints from extracted apple emoji

This isn't actually an issue but it seemed like the easiest way to ask a question about the code.

Re this:
https://github.com/rodrigopolo/minEmoji/blob/master/sprite_gen/apple_gen/sprite_gen.js#L1
How are you determining the proper order of those files? I'd previously looked at making emojistatic not dependent on gemoji by utilizing emoji-extractor instead (as you've done here), but I got stuck on the fact that it created files with sequential-ish filenames whereas I needed to map them to unicode codepoint IDs.

Is it free to use?

Hi, thank you for your work πŸ‘ And I want to use the minEmoji_iOS8 to my project. But I don't know the emoji images(Apple Sprites) whether are free to use or not ?

Add support for http://www.emoji-cheat-sheet.com/ cheatcodes

Hi, Thanks for a great plugin. Would like to know if you have any plans for supporting :smile: kind of keywords rather emoji1 span. It will be helpful while using smile picker to pick smiles and put them back in textbox as displaying etc..

It will be single point for emojis if the above feature can be added. I wanted to add them but your sprite images are not in sequence and I assume you have referred cheat codes before making sprite.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.