0 results found

Preview Plugin

Shows a popup of the current content in read-only format.

Contribute to this page
+ toolbar button + menu item

This plugin adds a preview button to the toolbar. Pressing the button opens a dialog box showing the current content in a preview mode. It also adds a menu item Preview under the View menu dropdown.

Type: String

Example
tinymce.init({
  selector: "textarea",  // change this value according to your HTML
  plugins: "preview",
  menubar: "view",
  toolbar: "preview"
});

Options

These settings affect the execution of the preview plugin. The height and width of the preview dialog box may be set here.

plugin_preview_height

This option allows you to set the height of the preview window that appears when using the preview plugin.

Type: Number

Default Value: 500

Example
tinymce.init({
  selector: "textarea",  // change this value according to your HTML
  plugins: "preview",
  menubar: "view",
  toolbar: "preview",
  plugin_preview_height: 500
});

plugin_preview_width

This option allows you to set the width of the preview window that appears when using the preview plugin.

Type: Number

Default Value: 650

Example
tinymce.init({
    selector: "textarea",  // change this value according to your HTML
    plugins: "preview",
    menubar: "view",
    toolbar: "preview",
    plugin_preview_width: 650
});

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.