# Visual Characters

> Editor42 Visual Characters plugin — toggles the visibility of invisible characters in the editor content.

Source: https://editor42.com/plugins/visualchars  
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: `visualchars`

```js
editor42.init({
  plugins: 'visualchars'
});
```

Toggles the visibility of invisible characters in the editor content, specifically non-breaking spaces and soft hyphens. When enabled, these characters are wrapped in styled `<span>` elements for visual identification but excluded from saved output.

## Options

| Option | Type | Default | Description |
|---|---|---|---|
| `visualchars_default_state` | boolean | `false` | Show invisible characters automatically on init. |

## Commands

| Command | Description |
|---|---|
| `editor42VisualChars` | Toggles visibility. |

## Toolbar buttons

| Button | Type | Description |
|---|---|---|
| `visualchars` | Toggle button | Toggles invisible character visibility. |

## Menu items

| Item | Type | Description |
|---|---|---|
| `visualchars` | Toggle menu item | Toggles invisible character visibility. |

## Events

| Event | Description |
|---|---|
| `VisualChars` | Fired when toggled. Payload: `{ state: boolean }`. |

## API

| Method | Description |
|---|---|
| `isEnabled()` | Returns current toggle state. |
