delete action in toolbar

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
ArthurP
Posts: 22
Joined: Mon Dec 11, 2023 3:10 pm

delete action in toolbar

Post by ArthurP »

Hi,

I'm trying to remove two actions from the toolbar. These actions are : insert a keyref and insert a conref.
In framework file.exf, I added the followling lines but actions are still here.

Code: Select all

<removeAction id="insert_reusable_component"/>
<removeAction id="insert.conkeyref"/>
Could you provide some help ? Thanks

Regards,
arthur
cosminef
Site Admin
Posts: 233
Joined: Wed Aug 30, 2023 2:33 pm

Re: delete action in toolbar

Post by cosminef »

Hello,

Sorry for the delayed reply.
Can you show us through a screenshot the exact actions you want removed from the toolbar?

Best,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
ArthurP
Posts: 22
Joined: Mon Dec 11, 2023 3:10 pm

Re: delete action in toolbar

Post by ArthurP »

Hi Cosmin,

These are the two buttons
buttons.png
Regards,
arthur
You do not have the required permissions to view the files attached to this post.
cosminef
Site Admin
Posts: 233
Joined: Wed Aug 30, 2023 2:33 pm

Re: delete action in toolbar

Post by cosminef »

Hello,

For this action:
Conref16@2x.png
the correct id is: "reuse.content" ; so in you exf file you have to use:

Code: Select all

<removeAction id="reuse.content"/>
For the other action the correct id is: "DITA/ReuseKeys" but in this case you already have an issue registered in our internal system - WA-8101 - "Removing the toolbar action "Insert links and variables defined in DITA keys" through an exf file doesn't work".
As a workaround you have to enter this field in your exf file:

Code: Select all

<webResources inherit="all">
    <addEntry path="${frameworkDir}/removeDITAReuseKeysAction.js" position="before"/>
 </webResources>
and in the removeDITAReuseKeysAction.js file looks like this:

Code: Select all

sync.ext.Registry.extension.registerActionsHandler(function(editor, actionsConfig) {
      setTimeout(() => {
        workspace.currentEditor.getActionsManager().unregisterAction('DITA/ReuseKeys');
        workspace.currentEditor.getActionsManager().refreshActionsStatus();
    });
  });
Best,
Cosmin
You do not have the required permissions to view the files attached to this post.
Cosmin Eftenie
www.oxygenxml.com
ArthurP
Posts: 22
Joined: Mon Dec 11, 2023 3:10 pm

Re: delete action in toolbar

Post by ArthurP »

Thanks Cosmin, it work like a charm.
The two buttons are successfully removed.

Regards,
arthur
Post Reply