public static class Toolbar.ToolbarBuilder extends AbstractBuilder<Toolbar>
| Constructor and Description |
|---|
ToolbarBuilder(Options.OptionsBuilder optionsBuilder) |
| Modifier and Type | Method and Description |
|---|---|
Toolbar.ToolbarBuilder |
alignCenter()
When the static option is true, this aligns the static toolbar relative to the center of the medium-editor element.
|
Toolbar.ToolbarBuilder |
alignLeft()
When the static option is true, this aligns the static toolbar relative to the left of the medium-editor element.
|
Toolbar.ToolbarBuilder |
alignRight()
When the static option is true, this aligns the static toolbar relative to the right of the medium-editor element.
|
Toolbar.ToolbarBuilder |
allButtons()
Enable all buttons.
|
Toolbar.ToolbarBuilder |
allowMultiParagraphSelection(boolean allowMultiParagraphSelection)
Enables/disables whether the toolbar should be displayed when selecting multiple paragraphs/block elements.
|
Toolbar |
build()
For internal use only.
|
elemental.json.JsonValue |
buildJson()
For internal use only.
|
Toolbar.ToolbarBuilder |
button(Buttons button)
Add a build in button
|
Toolbar.ToolbarBuilder |
button(Buttons button,
java.lang.String tooltip)
Add a button with a tooltip
|
Toolbar.ToolbarBuilder |
buttonAfter(Buttons after,
Buttons incoming)
Add a button after another one.
|
Toolbar.ToolbarBuilder |
buttonBefore(Buttons before,
Buttons incoming)
Add a button before another one.
|
Toolbar.ToolbarBuilder |
buttons(Buttons... buttons)
Add buttons
|
Toolbar.ToolbarBuilder |
buttons(ToolbarButton.ToolbarButtonBuilder... toolbarButtonBuilders)
Add buttons as
ToolbarButton.ToolbarButtonBuilder |
Toolbar.ToolbarBuilder |
buttonTranslations(java.lang.String... translations)
Set the translations to the existing buttons.
|
Toolbar.ToolbarBuilder |
clearButtons()
Clear the configured buttons.
|
Toolbar.ToolbarBuilder |
defaultButtons()
Enable the default buttons, which are ['bold', 'italic', 'underline', 'anchor', 'h2', 'h3', 'quote']
|
Toolbar.ToolbarBuilder |
diffLeft(int diffLeft)
Value in pixels to be added to the X axis positioning of the toolbar.
|
Toolbar.ToolbarBuilder |
diffTop(int diffTop)
Value in pixels to be added to the Y axis positioning of the toolbar.
|
Options.OptionsBuilder |
done() |
Toolbar.ToolbarBuilder |
firstButtonClass(java.lang.String firstButtonClass)
CSS class added to the first button in the toolbar.
|
Toolbar.ToolbarBuilder |
lastButtonClass(java.lang.String lastButtonClass)
CSS class added to the last button in the toolbar.
|
Toolbar.ToolbarBuilder |
standardizeSelectionStart(boolean standardizeSelectionStart)
Enables/disables standardizing how the beginning of a range is decided between browsers whenever the selected text is analyzed for updating toolbar buttons status.
|
Toolbar.ToolbarBuilder |
staticToolbar(boolean staticToolbar)
Enable/disable the toolbar always displaying in the same location relative to the medium-editor element.
|
Toolbar.ToolbarBuilder |
sticky(boolean sticky)
When the static option is true, this enables/disables the toolbar "sticking" to the viewport and staying visible on the screen while the page scrolls.
|
Toolbar.ToolbarBuilder |
stickyTopOffset(boolean stickyTopOffset)
When the sticky option is true, this set in pixel a top offset above the toolbar.
|
Toolbar.ToolbarBuilder |
updateOnEmptySelection(boolean updateOnEmptySelection)
When the static option is true, this enables/disables updating the state of the toolbar buttons even when the selection is collapsed (there is no selection, just a cursor).
|
putNotNull, putNotNull, putNotNull, putNotNull, putNotNull, putNotNullpublic ToolbarBuilder(Options.OptionsBuilder optionsBuilder)
public Toolbar.ToolbarBuilder allowMultiParagraphSelection(boolean allowMultiParagraphSelection)
public Toolbar.ToolbarBuilder defaultButtons()
public Toolbar.ToolbarBuilder allButtons()
public Toolbar.ToolbarBuilder buttonTranslations(java.lang.String... translations)
translations - the already added button's translationsToolbar.ToolbarBuilder for chainingpublic Toolbar.ToolbarBuilder button(Buttons button)
public Toolbar.ToolbarBuilder button(Buttons button, java.lang.String tooltip)
public Toolbar.ToolbarBuilder buttons(Buttons... buttons)
public Toolbar.ToolbarBuilder buttons(ToolbarButton.ToolbarButtonBuilder... toolbarButtonBuilders)
ToolbarButton.ToolbarButtonBuilderpublic Toolbar.ToolbarBuilder buttonBefore(Buttons before, Buttons incoming)
public Toolbar.ToolbarBuilder buttonAfter(Buttons after, Buttons incoming)
public Toolbar.ToolbarBuilder clearButtons()
public Toolbar.ToolbarBuilder diffLeft(int diffLeft)
public Toolbar.ToolbarBuilder diffTop(int diffTop)
public Toolbar.ToolbarBuilder firstButtonClass(java.lang.String firstButtonClass)
public Toolbar.ToolbarBuilder lastButtonClass(java.lang.String lastButtonClass)
public Toolbar.ToolbarBuilder standardizeSelectionStart(boolean standardizeSelectionStart)
public Toolbar.ToolbarBuilder staticToolbar(boolean staticToolbar)
public Toolbar.ToolbarBuilder alignLeft()
public Toolbar.ToolbarBuilder alignCenter()
public Toolbar.ToolbarBuilder alignRight()
public Toolbar.ToolbarBuilder sticky(boolean sticky)
public Toolbar.ToolbarBuilder stickyTopOffset(boolean stickyTopOffset)
public Toolbar.ToolbarBuilder updateOnEmptySelection(boolean updateOnEmptySelection)
public Options.OptionsBuilder done()
public Toolbar build()
AbstractBuilderbuild in class AbstractBuilder<Toolbar>public elemental.json.JsonValue buildJson()
AbstractBuilderbuildJson in class AbstractBuilder<Toolbar>