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

Add basic template support#613

Open
miroslavrussev wants to merge 3 commits into
joypixels:masterfrom
miroslavrussev:master
Open

Add basic template support#613
miroslavrussev wants to merge 3 commits into
joypixels:masterfrom
miroslavrussev:master

Conversation

@miroslavrussev

Copy link
Copy Markdown

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