Files
tinymce-docs-4x/plugins/preview.md
T
2018-01-08 11:01:42 +01:00

1.5 KiB

layout, title, title_nav, description, keywords, controls
layout title title_nav description keywords controls
default Preview Plugin Preview Shows a popup of the current content in read-only format. view preview plugin_preview_height plugin_preview_width 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 File and View menu dropdowns.

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
});