Full Screen plugin

The Full Screen plugin enables fullscreen editing in TinyMCE when using classic mode. Activating the toolbar button expands the editable area to fill the browser viewport. The plugin adds a Fullscreen toolbar button and a corresponding menu item under the View menu.

Fullscreen mode can be toggled using the following keyboard shortcuts:

  • macOS: Command+Shift+F

  • Windows or Linux: Ctrl+Shift+F

Basic setup

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'fullscreen',
  toolbar: 'fullscreen'
});
This feature is supported only when TinyMCE is operating in classic mode. It is not supported in inline mode. For details on the differences between editing modes, refer to Classic editing mode.

Options

The following configuration options affect the behavior of the Full Screen plugin.

fullscreen_native

The fullscreen_native option allows the editor to use the browser full screen mode, rather than only filling the browser window when full screen mode is enabled. This functionality is the same as full screen mode for online videos.

Type: Boolean

Default value: false

Possible values: true, false

This option is only supported when TinyMCE is in classic mode. It is not supported in inline mode.

Example: using fullscreen_native

To use the browser-native full screen mode for the TinyMCE editor, set fullscreen_native to true. For example:

tinymce.init({
  selector: 'textarea',  // change this value according to your html
  plugins: 'fullscreen',
  toolbar: 'fullscreen',
  fullscreen_native: true
});

Limitations of the fullscreen_native option

The fullscreen_native option has the following limitations. When fullscreen_native is enabled:

  • The Escape keyboard key (Esc) will exit full screen mode. Default editor behavior of the Esc key will be overridden by browser and the Esc key will exit full screen mode instead of closing dialogs, menus, or moving focus from the editor UI to the editor content. This may lead to accessibility issues.

  • For Firefox users, the full screen keyboard shortcut (Command+Shift+F or Ctrl+Shift+F) cannot be used to repeatedly toggle the browser-native full screen mode on and off without interacting with the editor between on toggles. If the user does not interact with the editor between off and on toggles, the plugin will fall-back to filling the browser window.

  • If the editor is initialized inside an iframe element, full screen mode will only fill the iframe on Firefox.

Toolbar buttons

The Full Screen plugin provides the following toolbar buttons:

Toolbar button identifier Description

fullscreen

Toggles fullscreen mode.

These toolbar buttons can be added to the editor using:

The Full Screen plugin provides the following menu items:

Menu item identifier Default Menu Location Description

fullscreen

View

Toggles fullscreen on/off.

These menu items can be added to the editor using:

Commands

The Full Screen plugin provides the following TinyMCE command.

Command Description

mceFullScreen

Toggles fullscreen mode.

Example
tinymce.activeEditor.execCommand('mceFullScreen');