Skip to main content

toggle-fullscreen-mode

Description

Fires when toggling the full screen mode

Usage

"toggle-fullscreen-mode": ({ mode?: boolean }) => boolean | void;

Parameters

The callback of the toggle-fullscreen-mode event can take an object with the following parameter:

  • mode - enables a fullscreen mode
info

For handling the inner events you can use the Event Bus methods

Example

// initialize RichText
const editor = new richtext.Richtext("#root", {
// configuration properties
});
// subscribe to the "toggle-fullscreen-mode" event
editor.api.on("toggle-fullscreen-mode", (obj) => {
console.log(obj);
console.log("The full screen mode was changed");
});
// enable the full screen mode
editor.api.exec("toggle-fullscreen-mode", { mode: true });

Change log: The event was added in v2.0