Visual Characters plugin
See invisible characters like non-breaking spaces.
Contribute to this pageThis plugin adds the ability to see invisible characters like
displayed in the editable area. It also adds a toolbar control and a menu item Show invisible characters
under the View
menu.
Basic setup
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'visualchars',
menubar: 'view',
toolbar: 'visualchars'
});
Options
This setting affects the execution of the visualchars
plugin. Characters can be configured to be visible by default using this option.
visualchars_default_state
This option enables specifying the default state of the Visual Characters plugin.
Type: Boolean
Default Value: false
Possible Values: true
, false
Example: Using visualchars_default_state
tinymce.init({
selector: 'textarea', // change this value according to the HTML
plugins: 'visualchars',
menubar: 'view',
toolbar: 'visualchars',
visualchars_default_state: true
});
Toolbar buttons
The Visual Characters plugin provides the following toolbar buttons:
Toolbar button identifier | Description |
---|---|
visualchars | Toggles the visibility of non breaking character elements. |
These toolbar buttons can be added to the editor using:
- The
toolbar
configuration option. - The
quickbars_insert_toolbar
configuration option. - Custom Context toolbars.
Menu items
The Visual Characters plugin provides the following menu items:
Menu item identifier | Default Menu Location | Description |
---|---|---|
visualchars | View | Toggles visibility of nonbreaking spaces on/off. |
These menu items can be added to the editor using:
- The
menu
configuration option. - The
contextmenu
configuration option. - Custom Menu toolbar buttons.
Commands
The Visual Blocks plugin provides the following JavaScript command.
Command | Description |
---|---|
mceVisualChars | Toggles visual characters on/off. |
Example
tinymce.activeEditor.execCommand('mceVisualChars');
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.