Class type Goog.Geditor.Plugins.basicTextFormatter
class type basicTextFormatter = object..end
Inherits
method cleanContentsDom :
'a. (#Dom_html.element as 'a) Js.t -> unit Js.meth
Cleans the contents of the node passed to it. The node contents are modified directly, and the modifications will subsequently be used, for operations such as saving the innerHTML of the editor etc. Since the plugins act on the DOM directly, this method can be very expensive.
This op is invoked even on disabled plugins.
method cleanContentsHtml : Js.js_string Js.t -> Js.js_string Js.t Js.meth
Cleans the html contents of Trogedit. Both cleanContentsDom and and cleanContentsHtml will be called on contents extracted from Trogedit. The inverse of prepareContentsHtml.
This op is invoked even on disabled plugins.
Returns Cleaned-up HTML.
method getTrogClassId : Js.js_string Js.t Js.meth
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.
method isSupportedCommand : Js.js_string Js.t -> bool Js.t Js.meth
Whether the string corresponds to a command this plugin handles.
Returns Whether the string corresponds to a command
this plugin handles.
method queryCommandValue : Js.js_string Js.t -> Js.js_string Js.t Js.meth
Gets the command value.
Returns The current value of the command in the given
selection. NOTE: This return type list is not documented in MSDN or MDC
and has been constructed from experience. Please update it
if necessary.
