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

Add basic template support #613

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

miroslavrussev
Copy link

This adds basic HTML template support for image and sprite elements by adding two new options to the global settings.

emojione.spriteTemplate = '<span class="emojione emojione-{{size}}-{{category}} _{{code}}" {{title}}>{{alt}}</span>';
emojione.imageTemplate = '<img class="emojione" alt="{{alt}}" {{title}} src="{{src}}"/>';

Current possible replacements are:
{{src}}
{{size}}
{{category}}
{{code}}
{{title}}
{{alt}}

This adds basic HTML template support for image and sprite elements by adding two new options to the global settings.

```
emojione.spriteTemplate = '<span class="emojione emojione-{{size}}-{{category}} _{{code}}" {{title}}>{{alt}}</span>';
emojione.imageTemplate = '<img class="emojione" alt="{{alt}}" {{title}} src="{{src}}"/>';
```

Current possible replacements are:
`{{src}}`
`{{size}}`
`{{category}}`
`{{code}}`
`{{title}}`
`{{alt}}`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant