Adds a toolbar button and a : trigger for inserting emoji. The dropdown and command palette show grouped emoji grids (favorites, smileys, gestures, and more).
Click Emoji in the toolbar, or type : followed by a filter name to open the emoji palette.
<script src="/assets/redactor/redactor.js"></script>
<script src="/assets/redactor/plugins/emoji/emoji.js"></script>
const app = Redactor('#entry', {
plugins: ['emoji']
});
boolean)
truetrue, adds the button to the context toolbar as well.string)
':'string)
object)
EmojiPlugin.defaultOptions.items for the default set.Redactor('#entry', {
plugins: ['emoji'],
emoji: {
trigger: ':',
items: {
favorites: {
thumbsUp: '👍',
heart: '❤️',
fire: '🔥'
}
}
}
});
en: {
emoji: {
emoji: 'Emoji',
favorites: 'Favorites',
smileys: 'Smileys',
gestures: 'Gestures',
animals: 'Animals',
food: 'Food',
activities: 'Activities',
travel: 'Travel'
}
}
This plugin does not emit events.
Inserts an emoji character at the caret and closes the dropdown.
Parameters:
value (string) — emoji character to insert.app.emoji.insert({ value: '👍' });