Skip to main content

toggle-shortcut-info

Description

Fires when toggling the shortcut info

Usage

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

Parameters

The callback of the toggle-shortcut-info event can take an object with the following parameter:

  • mode - enables a shortcut info; true to show shortcut info popup, false to hide shortcut info popup
info

For handling inner events you can use Event Bus methods

Example

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

Change log: The event was added in v2.0