defaulttoolbar.js
No description.

File Location

/goog/ui/editor/defaulttoolbar.js


Public Protected Private

Global Functions

goog.ui.editor.DefaultToolbar.addDefaultFontSizes(button)
Initializes the given font size menu button by adding default font sizes to it.
Arguments:
button : !goog.ui.Select
Font size menu button.
code »
goog.ui.editor.DefaultToolbar.addDefaultFonts(button)
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.
Arguments:
button : !goog.ui.Select
Font menu button.
code »
goog.ui.editor.DefaultToolbar.addDefaultFormatOptions(button)
Initializes the given "Format block" menu button by adding default format options to the menu.
Arguments:
button : !goog.ui.Select
"Format block" menu button.
code »
goog.ui.editor.DefaultToolbar.backgroundColorFactory_(idtooltipcaptionopt_classNamesopt_rendereropt_domHelper) !goog.ui.Button
Creates a toolbar button with the given ID, tooltip, and caption. Applies any custom CSS class names to the button's caption element. Use to create a font background color button.
Arguments:
id : string
Button ID; must equal a goog.editor.Command for built-in buttons, anything else for custom buttons.
tooltip : string
Tooltip to be shown on hover.
caption : goog.ui.ControlContent
Button caption.
opt_classNames : string=
CSS class name(s) to apply to the caption element.
opt_renderer : goog.ui.ColorMenuButtonRenderer=
Button renderer; defaults to goog.ui.ToolbarColorMenuButtonRenderer if unspecified.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: !goog.ui.Button  A toolbar button.
code »
goog.ui.editor.DefaultToolbar.colorUpdateFromValue_(buttoncolor)
Function to update the state of a color menu button.
Arguments:
button : goog.ui.ToolbarColorMenuButton
The button to which the color menu is attached.
color : number
Color value to update to.
code »
function%90&button.factory()
No description.
code »
goog.ui.editor.DefaultToolbar.fontColorFactory_(idtooltipcaptionopt_classNamesopt_rendereropt_domHelper) !goog.ui.Button
Creates a toolbar button with the given ID, tooltip, and caption. Applies any custom CSS class names to the button's caption element. Use to create a font color button.
Arguments:
id : string
Button ID; must equal a goog.editor.Command for built-in buttons, anything else for custom buttons.
tooltip : string
Tooltip to be shown on hover.
caption : goog.ui.ControlContent
Button caption.
opt_classNames : string=
CSS class name(s) to apply to the caption element.
opt_renderer : goog.ui.ColorMenuButtonRenderer=
Button renderer; defaults to goog.ui.ToolbarColorMenuButtonRenderer if unspecified.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: !goog.ui.Button  A toolbar button.
code »
goog.ui.editor.DefaultToolbar.fontFaceFactory_(idtooltipcaptionopt_classNamesopt_rendereropt_domHelper) !goog.ui.Button
Creates a toolbar button with the given ID, tooltip, and caption. Applies any custom CSS class names to the button's caption element. Used to create a font face button, filled with default fonts.
Arguments:
id : string
Button ID; must equal a goog.editor.Command for built-in buttons, anything else for custom buttons.
tooltip : string
Tooltip to be shown on hover.
caption : goog.ui.ControlContent
Button caption.
opt_classNames : string=
CSS class name(s) to apply to the caption element.
opt_renderer : goog.ui.MenuButtonRenderer=
Button renderer; defaults to goog.ui.ToolbarMenuButtonRenderer if unspecified.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: !goog.ui.Button  A toolbar button.
code »
goog.ui.editor.DefaultToolbar.fontSizeFactory_(idtooltipcaptionopt_classNamesopt_rendereropt_domHelper) !goog.ui.Button
Creates a toolbar button with the given ID, tooltip, and caption. Applies any custom CSS class names to the button's caption element. Use to create a font size button, filled with default font sizes.
Arguments:
id : string
Button ID; must equal a goog.editor.Command for built-in buttons, anything else for custom buttons.
tooltip : string
Tooltip to be shown on hover.
caption : goog.ui.ControlContent
Button caption.
opt_classNames : string=
CSS class name(s) to apply to the caption element.
opt_renderer : goog.ui.MenuButtonRenderer=
Button renderer; defaults to goog.ui.ToolbarMebuButtonRenderer if unspecified.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: !goog.ui.Button  A toolbar button.
code »
goog.ui.editor.DefaultToolbar.formatBlockFactory_(idtooltipcaptionopt_classNamesopt_rendereropt_domHelper) !goog.ui.Button
Creates a toolbar button with the given ID, tooltip, and caption. Applies any custom CSS class names to the button's caption element. Use to create the format menu, prefilled with default formats.
Arguments:
id : string
Button ID; must equal a goog.editor.Command for built-in buttons, anything else for custom buttons.
tooltip : string
Tooltip to be shown on hover.
caption : goog.ui.ControlContent
Button caption.
opt_classNames : string=
CSS class name(s) to apply to the caption element.
opt_renderer : goog.ui.MenuButtonRenderer=
Button renderer; defaults to goog.ui.ToolbarMenuButtonRenderer if unspecified.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: !goog.ui.Button  A toolbar button.
code »
goog.ui.editor.DefaultToolbar.makeBuiltInToolbarButton(commandopt_domHelper) goog.ui.Button
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!
Arguments:
command : string
Editor command ID.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: goog.ui.Button  Toolbar button (null if no built-in button exists for the command).
code »
goog.ui.editor.DefaultToolbar.makeDefaultToolbar(elemopt_isRightToLeft) !goog.ui.Toolbar
Creates a goog.ui.Toolbar containing a default set of editor toolbar buttons, and renders it into the given parent element.
Arguments:
elem : !Element
Toolbar parent element.
opt_isRightToLeft : boolean=
Whether the editor chrome is right-to-left; defaults to the directionality of the toolbar parent element.
Returns: !goog.ui.Toolbar  Default editor toolbar, rendered into the given parent element.
code »
goog.ui.editor.DefaultToolbar.makeToolbar(itemselemopt_isRightToLeft) !goog.ui.Toolbar
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).
Arguments:
items : !Array.<string | goog.ui.Control>
Toolbar items; each must be a goog.editor.Command or a goog.ui.Control.
elem : !Element
Toolbar parent element.
opt_isRightToLeft : boolean=
Whether the editor chrome is right-to-left; defaults to the directionality of the toolbar parent element.
Returns: !goog.ui.Toolbar  Editor toolbar, rendered into the given parent element.
code »
goog.ui.editor.DefaultToolbar.rtlButtonFactory_(idtooltipcaptionopt_classNamesopt_rendereropt_domHelper) !goog.ui.Button
Creates a toolbar button with the given ID, tooltip, and caption. Applies any custom CSS class names to the button's caption element. This button is designed to be used as the RTL button.
Arguments:
id : string
Button ID; must equal a goog.editor.Command for built-in buttons, anything else for custom buttons.
tooltip : string
Tooltip to be shown on hover.
caption : goog.ui.ControlContent
Button caption.
opt_classNames : string=
CSS class name(s) to apply to the caption element.
opt_renderer : goog.ui.ButtonRenderer=
Button renderer; defaults to goog.ui.ToolbarButtonRenderer if unspecified.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: !goog.ui.Button  A toolbar button.
code »
goog.ui.editor.DefaultToolbar.setLocale(locale)
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.
Arguments:
locale : string
Locale to use for the toolbar font names.
code »
goog.ui.editor.DefaultToolbar.undoRedoButtonFactory_(idtooltipcaptionopt_classNamesopt_rendereropt_domHelper) !goog.ui.Button
Creates a toolbar button with the given ID, tooltip, and caption. Applies any custom CSS class names to the button's caption element. Designed to be used to create undo and redo buttons.
Arguments:
id : string
Button ID; must equal a goog.editor.Command for built-in buttons, anything else for custom buttons.
tooltip : string
Tooltip to be shown on hover.
caption : goog.ui.ControlContent
Button caption.
opt_classNames : string=
CSS class name(s) to apply to the caption element.
opt_renderer : goog.ui.ButtonRenderer=
Button renderer; defaults to goog.ui.ToolbarButtonRenderer if unspecified.
opt_domHelper : goog.dom.DomHelper=
DOM helper, used for DOM creation; defaults to the current document if unspecified.
Returns: !goog.ui.Button  A toolbar button.
code »
goog.ui.editor.DefaultToolbar.rtlButtonFactory_&button.updateFromValue()
No description.
code »
goog.ui.editor.DefaultToolbar.undoRedoButtonFactory_&button.updateFromValue()
No description.
code »
goog.ui.editor.DefaultToolbar.fontFaceFactory_&button.updateFromValue()
No description.
code »
goog.ui.editor.DefaultToolbar.fontSizeFactory_&button.updateFromValue()
No description.
code »
goog.ui.editor.DefaultToolbar.formatBlockFactory_&button.updateFromValue()
No description.
code »

Global Variables

function%90 :
No description.
Code »
ja :
No description.
Code »
ko :
No description.
Code »
zh-cn :
No description.
Code »
zh-tw :
No description.
Code »

Directory editor

File Reference