# Character Map

> Editor42 Character Map plugin — provides a special character picker for browsing and inserting Unicode characters.

Source: https://editor42.com/plugins/charmap  
Every page of editor42.com has a Markdown copy at its URL + `.md` (`index.md` after a URL that ends in `/`); all of them are in one file: https://editor42.com/llms-full.txt

Plugin alias: `charmap`

```js
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

| Option | Type | Default | Description |
|---|---|---|---|
| `charmap` | array or function | built-in map | Replaces the entire character map. Array of `[charCode, name]` tuples or a function returning such. |
| `charmap_append` | array or function | — | Appends additional characters to the built-in map. |

## Commands

| Command | Description |
|---|---|
| `editor42ShowCharmap` | Opens the character picker dialog. |

## Toolbar buttons

| Name | Type | Description |
|---|---|---|
| `charmap` | Button | Special character. |

## Menu items

| Name | Description |
|---|---|
| `charmap` | Special character. |

## Events

| Event | Description |
|---|---|
| `insertCustomChar` | Fired before a character is inserted. Payload: `{ chr }`. Allows modifying the character. |

## API

| Method | Description |
|---|---|
| `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.
