loading table of contents...

7.8.2. Example: Add a disapprove button to the actions toolbar

Assume that you want to add a new button to the actions toolbar. Clicking the button should disapprove the current content of the work area. This is the plugin rule which will do the job:

...
<editor:studioPlugin>
  <ui:rules>
    <editor:actionsToolbar>
      <plugins>
        <ui:addItemsPlugin>
          <ui:items>
            <button>
              <baseAction>
                <editor:disapproveAction contentVariableName="{actionsToolbar.CONTENT_VARIABLE_NAME}"/>
              </baseAction>
            </button>
          </ui:items>
        </ui:addItemsPlugin>
      </plugins>
    </editor:actionsToolbar>
  </ui:rules>
</editor:studioPlugin>
...

The configuration class actionsToolbar is a public API context provider and describes in its AS doc the constant CONTENT_VARIABLE_NAME: [The context property name for the content on which the actions will operate. It is the current content in the work area.]