ng-emoticons

An angularjs filter for converting text into emoticons.
Homepage:
1 person uses it
Author: 5389035?v=3 ritz078

Imgur

An AngularJS filter for converting text into emoticons.

Features

  • Converts emoticon text codes into emoticons.
  • Finds links in text input and turns them into html links.

Types of emoticons

Currently this filter supports two types of smileys :

  1. Font Smileys : These smileys are fonts .
  1. Emojis : If you are going to use it you already know about it.

Screenshot

screenshot

Dependencies

  • AngularJs 1.2 or above
  • angular-sanitize 1.2 or above

Getting Started

Install through bower html bower install --save ng-emoticons Install through npm html npm install --save ng-emoticons

load css files html <link rel="stylesheet" href="path/to/ng-emoticons.min.css"/>

Then load the following files html <script src="bower_components/angular/angular.js"></script> <script src="bower_components/angular-sanitize/angular-sanitize.js"></script> <script src="path/to/ng-emoticons.js"></script>

Load 'Emoticons' as a dependency javascript angular.module('ngEmoticonApp', ['ngEmoticons'])

HTML: html <div ng-bind-html="text | emoticons"></div>

Options

  • link ( boolean )

    • default : true
    • Usage : html <div ng-bind-html="text | emoticons:{link:false}"></div>
  • linkTarget ( '_self' / '_blank' )

    • default : '_self'
    • Works only when link option is set to true.
    • '_blank' is used to open the link in a new tab and '_self' is used to open the link in the same tab.
    • Usage : html <div ng-bind-html="text | emoticons:{linkTarget:'_blank'}"></div>

Version 1.1.0

  • Emoji support added.
  • Converts links into anchor tags.

Version 1.0.0

  • Better directory structure.
  • Updated dependencies.
  • Added smileys' variation.

Version 0.2.0

Using font instead of images.

Contributing

  • If you are Interested in contributing to this project, you are most welcome.
  • If it is a bug-fix/improvement, first report it at issues
  • Discuss with us in detail about your issue/improvement
  • Get the issue allotted.
  • If you are contributing a bug-fix or a very minor addition, feel free to do a pull request on the master # branch.
  • If you are unsure about the bug/improvement, create an issue to discuss.
  • Report bugs @ issues

License

The MIT License (MIT)

Copyright (c) 2014 Ritesh Kumar

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.

comments powered by Disqus
This page was last updated over 2 years ago.