Code plugin
This plugin adds a toolbar button that allows a user to edit the HTML code hidden by the WYSIWYG view. It also adds the menu item Source code
under the Tools
menu.
Basic setup
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'code',
toolbar: 'code',
});
Toolbar buttons
The Code plugin provides the following toolbar buttons:
Toolbar button identifier | Description |
---|---|
|
Opens the code dialog. |
These toolbar buttons can be added to the editor using:
-
The
toolbar
configuration option. -
The
quickbars_insert_toolbar
configuration option.
Menu items
The Code plugin provides the following menu items:
Menu item identifier | Default Menu Location | Description |
---|---|---|
|
View |
Opens the code dialog. |
These menu items can be added to the editor using:
-
The
menu
configuration option. -
The
contextmenu
configuration option.