Class type Goog.​Geditor.​Plugins.​headerFormatter

class type headerFormatter = object..end

Inherits


method getTrogClassId : Js.js_string Js.t

Returns The ID unique to this plugin class. Note that different instances off the plugin share the same classId.

method handleKeyboardShortcut : 
Goog.Events.browserEvent Js.t ->
Js.js_string Js.t -> bool Js.t -> bool Js.t Js.meth

Handles keyboard shortcuts. Preferred to using handleKey* as it will use the proper event based on browser and will be more performant. If handleKeyPress/handleKeyDown returns true, this will not be called. If the plugin handles the shortcut, it is responsible for dispatching appropriate events (change, selection change at the time of this comment). If the plugin calls execCommand on the editable field, then execCommand already takes care of dispatching events. NOTE: For performance reasons this is only called when any key is pressed in conjunction with ctrl/meta keys OR when a small subset of keys (defined in goog.editor.Field.POTENTIAL_SHORTCUT_KEYCODES_) are pressed without ctrl/meta keys. We specifically don't invoke it when altKey is pressed since alt key is used in many i8n UIs to enter certain characters.

Returns Whether the event was handled and thus should *not* be propagated to other plugins. We also call preventDefault on the event if the return value is true.