Skip to content

Change Toolbar

The action exposes an easy way to manipulate the editor’s toolbar preset using a dynamic action interface in the page designer, for example:

  • change the number of visible buttons within the toolbar group
  • add button(s) to toolbar group
  • remove button(s) from toolbar group
  • remove toolbar group

:::note Dynamic Action pre-requisites

The guidelines describing dynamic action configuration (dynamic action event, triggering element and affected elements) are described in parent document Configuration.

:::

Changes the number of buttons visible in the given toolbar group.

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Change Number of Visible Buttons
GroupSelect listThe editor’s toolbar group to be updated.
Buttons VisibleNumbera new number of buttons visible in the selected group.

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example shows only one button in the toolbar group paragraph. Hidden buttons are available after expanding toolbar paragraph group.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Change Number of Visible Buttons
  4. Set Settings / Group to Paragraph
  5. Set Settings / Buttons Visible to 1
  6. Clear Affected Elements / Selection Type
  7. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Change Number of Visible Buttons in the sample application example page available online.

:::

Adds the selected Froala button to the specified Froala toolbar group in the given position.

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Add Button
GroupSelect listThe toolbar group to be updated
ButtonSelect listThe toolbar button to be added to the selected group
Button PositionNumberPosition of the new button in the selected group

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example adds a new button in the beginning of the toolbar group paragraph.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Add Button
  4. Set Settings / Group to Paragraph
  5. Set Settings / Button to Emoticons
  6. Set Settings / Button Position to 1
  7. Clear Affected Elements / Selection Type
  8. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Add Button in the sample application example page available online.

:::

Adds multiple buttons to the specified Froala toolbar group in the given position.

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Add Buttons
GroupSelect listFroala toolbar group to be updated
ButtonsTextComma-separated list of toolbar buttons to be added
Button PositionNumberPosition of new buttons in the selected group

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example adds new buttons in the beginning of the toolbar group paragraph.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Add Button
  4. Set Settings / Group to Paragraph
  5. Set Settings / Buttons to specialCharacters,emoticons
  6. Set Settings / Button Position to 1
  7. Clear Affected Elements / Selection Type
  8. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Add Button in the sample application example page available online.

:::

Removes the selected Froala button from the specified Froala toolbar group

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Remove Button From Group
GroupSelect listFroala toolbar group to be updated
ButtonSelect listFroala button to be removed from the selected group

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example removes button Font size from the toolbar group paragraph.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Remove Button From Group
  4. Set Settings / Group to Paragraph
  5. Set Settings / Button to Font size
  6. Clear Affected Elements / Selection Type
  7. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Remove Button From Group in the sample application example page available online.

:::

Removes all the buttons from the selected toolbar group.

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Remove All Buttons From Group
GroupSelect listFroala toolbar group to be updated

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example removes all buttons from the toolbar group paragraph.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Remove All Buttons From Group
  4. Set Settings / Group to Paragraph
  5. Clear Affected Elements / Selection Type
  6. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Remove All Buttons From Group in the sample application example page available online.

:::

Removes all buttons from all toolbar groups.

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Remove All Buttons

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example removes all buttons from toolbar groups paragraph, text, rich and misc.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Remove All Buttons
  4. Clear Affected Elements / Selection Type
  5. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Remove All Buttons in the sample application example page available online.

:::

Removes multiple buttons from the selected Froala toolbar group.

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Remove Buttons From Group
GroupSelect listFroala toolbar group to be updated
ButtonsTextComma-separated list of buttons to be removed from selected toolbar group

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example removes buttons paragraphFormat,fontFamily,fontSize from the toolbar group paragraph.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Remove Buttons From Group
  4. Set Settings / Group to Paragraph
  5. Clear Affected Elements / Selection Type
  6. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Remove Buttons From Group in the sample application example page available online.

:::

Removes a selected group from toolbar.

AttributeTypeDescription
ActionSelect listMust be set to Change Toolbar
Toolbar CustomizationSelect listMust be set to Remove Group
GroupSelect listToolbar group to be removed

:::note Affected Elements The customization is applied to all page items triggering the plug-in event UC Froala Before Initialization. Learn more about applying dynamic action to specific plug-in page items in the section Affected Elements

:::

The example removes paragraph group from the toolbar.

Dynamic action definition

  1. Set When / Event to UC Froala Before Initialization
  2. Set When / Selection Type to JavaScript Expression
  3. Set When / JavaScript Expression to document

True (or false) action definition

  1. Set Identification / Action to UC - Rich Text Editor Pro (Extend) [Plug-in]
  2. Set Settings / Action to Change Toolbar
  3. Set Settings / Toolbar Customization to Remove Group
  4. Set Settings / Group to Paragraph
  5. Clear Affected Elements / Selection Type
  6. Set Execution Options / Fire on Initialization to Disabled

:::tip Give it a try

Test the plug-in action Remove Group in the sample application example page available online.

:::