Skip to main content

Character Map

Plugin alias: charmap

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

Provides a special character picker that lets users browse and search categorized Unicode characters (currency, text, quotations, math, Latin, symbols, arrows) and insert them into the editor. Also supports inline autocomplete triggered by typing : followed by at least 2 characters.

Options​

OptionTypeDefaultDescription
charmaparray or functionbuilt-in mapReplaces the entire character map. Array of [charCode, name] tuples or a function returning such.
charmap_appendarray or function—Appends additional characters to the built-in map.

Commands​

CommandDescription
editor42ShowCharmapOpens the character picker dialog.

Toolbar buttons​

NameTypeDescription
charmapButtonSpecial character.
NameDescription
charmapSpecial character.

Events​

EventDescription
insertCustomCharFired before a character is inserted. Payload: { chr }. Allows modifying the character.

API​

MethodDescription
getCharMap()Returns character map groups.
insertChar(chr)Inserts a character into the editor.

Also registers an autocompleter triggered by : with 2+ characters that searches character names.