Skip to main content

Emoticons

Plugin alias: emoticons

editor42.init({
plugins: 'emoticons'
});

Provides an emoji picker dialog and inline autocomplete for inserting Unicode emoji characters into the editor. Loads an external emoji database, organizes entries by category, and supports both a browsable tabbed dialog and a colon-triggered (:) autocomplete dropdown.

Options​

OptionTypeDefaultDescription
emoticons_databasestringemojisName of the emoji database file.
emoticons_database_urlstring${pluginUrl}/js/${emoticons_database}${suffix}.jsFull URL to the emoji database script. Constructed dynamically from the plugin path, database name, and editor suffix.
emoticons_database_idstringeditor42.plugins.emoticonsResource ID for caching.
emoticons_appendobject{}Additional user-defined emoji entries to merge.
emoticons_images_urlstringhttps://cdnjs.cloudflare.com/ajax/libs/twemoji/15.1.0/72x72/Base URL for image-based emoji, used when emoticons_database is emojiimages. Before 42.0.1 the default was https://twemoji.maxcdn.com/v/13.0.1/72x72/; a Content-Security-Policy whose img-src names that host needs the new one, or this option set.

Commands​

CommandDescription
editor42EmoticonsOpens the emoji picker dialog.

Toolbar buttons​

NameTypeDescription
emoticonsButtonEmoticons.
NameDescription
emoticonsEmoticons.

Also registers an autocompleter triggered by : with 2+ characters.