Class

EmojiButtonTrigger

EmojiButtonTrigger()

The emoji-picker component adds the possibility to insert emojis to the tag names and notes on desktop platforms (electron app). It provides an emoji picker trigger button and inserts emoji in the previous DOM text input or codeMirror editor.

The Emoji Picker dialog is implemented via this external library: https://github.com/zhuiks/emoji-button This library is a customized version of the original: https://github.com/joeattardi/emoji-button

The library instance is kept inside the module variable picker.

Constructor

# new EmojiButtonTrigger()

View Source frontend/components/emoji_button_trigger.js, line 60

Methods

# attachEditor(codeMirror)

Appends emoji picker button to codeMirror

Parameters:
Name Type Description
codeMirror

active codeMirror editor instance

View Source frontend/components/emoji_button_trigger.js, line 97

# insertEmoji(emoji)

Insert emoji into input or codeMirror depending on the context in the DOM To be called only by the Picker library in the "emoji" event callback

Parameters:
Name Type Description
emoji string

active codeMirror editor instance

View Source frontend/components/emoji_button_trigger.js, line 112