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.
Example
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "code",
toolbar: "code",
menubar: "tools"
});
Options
code_dialog_height
This configuration option sets the internal, editable area height of the code
dialog box.
Note that the external dimensions of the actual modal will be slightly larger than the value set.
Type: Number
Example
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "code",
toolbar: "code",
menubar: "tools",
code_dialog_height: 200
});
code_dialog_width
This configuration option sets the internal, editable area width of the code
dialog box.
Note that the external dimensions of the actual modal will be slightly larger than the value set.
Type: Number
Example
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "code",
toolbar: "code",
menubar: "tools",
code_dialog_width: 300
});
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.