Extrabar

Secondary toolbar row.

add#

Registers a dynamic extrabar button config by name.

Parameters:

  • name (string) — identifier name
  • config (object) — configuration object
app.extrabar.add('myBtn', { title: 'Custom', command: 'my.command' });

remove#

Marks button names as removed from the extrabar.

Parameters:

  • ...names (Array) — list of names to process
app.extrabar.remove('preview');

addDynamic#

Queues a dynamic button for insertion when the extrabar DOM exists.

Parameters:

  • name (string) — identifier name
  • config (object) — configuration object
app.extrabar.addDynamic('pluginBtn', { icon: '…', command: 'plugin.run' });

removeDynamic#

Removes a dynamically inserted button from the extrabar DOM.

Parameters:

  • name (string) — identifier name
app.extrabar.removeDynamic('pluginBtn');

setActive#

Adds button name(s) to the API active overlay set.

Parameters:

  • names (Array) — list of names to process
app.extrabar.setActive('html');

clearActive#

Removes button name(s) from the API active overlay set.

Parameters:

  • names (Array) — list of names to process
app.extrabar.clearActive('html');

clearAllActive#

Clears all API-driven active button states.

app.extrabar.clearAllActive();

setDisabled#

Disables extrabar buttons via the uiButtonsState service.

Parameters:

  • names (Array) — list of names to process
app.extrabar.setDisabled('preview');

clearDisabled#

Re-enables named extrabar buttons.

Parameters:

  • names (Array) — list of names to process
app.extrabar.clearDisabled('preview');

setDisabledAll#

Disables all extrabar buttons except those listed in except.

Parameters:

  • except (Array) — names or types to exclude from the rule
app.extrabar.setDisabledAll({ except: ['source'] });

clearDisabledAll#

Clears disabled state on all buttons except those listed in except.

Parameters:

  • except (Array) — names or types to exclude from the rule
app.extrabar.clearDisabledAll();

updateButton#

Patches dynamic config and live button state by name.

Parameters:

  • name (string) — identifier name
  • patch (object) — patch
app.extrabar.updateButton('preview', { disabled: true });

getButton#

Returns the Button instance for an extrabar button name.

Parameters:

  • name (string) — identifier name

Returns: Button|null

app.extrabar.getButton('preview');

getButtonEl#

Returns the DOM element for an extrabar button name.

Parameters:

  • name (string) — identifier name

Returns: HTMLElement|null

app.extrabar.getButtonEl('preview');