Skip to content

Repository files navigation

Emoticons

This meteor packages adds a helper function to your project which parses emoticon strings and replaces them with images. There is a basic set of 24 icons, but you can add as many as you want by populating Meteor.settings.public.extraEmoticons or you can completely replace the core set with your own icons by overwriting Meteor.settings.public.coreEmoticons.

alt tag

Quick Start

$ meteor add mattimo:emoticons

You will get a new helper

{{{parseEmoticons "text"}}}

All emoticons output will have the meteoremoticon css class like so:

<img class="meteoremoticon" src="{{url}}">

Adding Extra Icons

{
  "public": {
    "extraEmoticons": [
      {
        "image": "/path/to/beer.gif",
        "replacements": [":beer:", ":cheers", ":toast:"]
      },
      {
        "image": "/path/to/something.png",
        "replacements": [":somethingcool:"]
      }
    ]
  }
}

Replacing Core Icons

This will overwrite all of the core icons, so you need to define a full set.

{
  "public": {
    "coreEmoticons": [
      {
        "image": "/path/to/happy.png",
        "replacements": [":)", ":-)"]
      },
      {
        "image": "/path/to/wink.png",
        "replacements": [";)", ";-)"]
      }
    ]
  }
}

About

An emoticon plugin for meteor. The configuration settings make it easy to add your own icons.

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages