Module Goog.​Ui.​Editor.​DefaultToolbar

module DefaultToolbar : sig..end

val addDefaultFontSizes : #Goog.Ui.select Js.t -> unit

Initializes the given font size menu button by adding default font sizes to it.

val addDefaultFonts : #Goog.Ui.select Js.t -> unit

Initializes the given font menu button by adding default fonts to the menu. If goog.ui.editor.DefaultToolbar.setLocale was called to specify a locale for which locale-specific default fonts exist, those are added before common fonts.

val addDefaultFormatOptions : #Goog.Ui.select Js.t -> unit

Initializes the given "Format block" menu button by adding default format options to the menu.

val makeBuiltInToolbarButton : 
  Js.js_string Js.t ->
  Goog.Gdom.domHelper Js.t Js.opt -> #Goog.Ui.button Js.t

Creates an instance of a subclass of goog.ui.Button for the given goog.editor.Command, or null if no built-in button exists for the command. Note that this function is only intended to create built-in buttons; please don't try to hack it!

Returns Toolbar button (null if no built-in button exists for the command).

val makeDefaultToolbar : 
  #Dom_html.element Js.t -> bool Js.t Js.opt -> Goog.Ui.toolbar Js.t

Creates a goog.ui.Toolbar containing a default set of editor toolbar buttons, and renders it into the given parent element.

Returns Default editor toolbar, rendered into the given parent element.

val makeToolbar : 
  (Js.js_string Js.t, Goog.Ui.control Js.t) Goog.Tools.Union.t
  Js.js_array Js.t ->
  #Dom_html.element Js.t -> bool Js.t Js.opt -> Goog.Ui.toolbar Js.t

Creates a goog.ui.Toolbar containing the specified set of toolbar buttons, and renders it into the given parent element. Each item in the items array must either be a goog.editor.Command (to create a built-in button) or a subclass of goog.ui.Control (to create a custom control).

Returns Editor toolbar, rendered into the given parent element.

val setLocale : Js.js_string Js.t -> unit

Sets the locale for the font names. If not set, defaults to 'en-us'. Used only for default creation of font names name. Must be set before font name menu is created.