Web Author Paste Special keyboard shortcut

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
aabuan
Posts: 12
Joined: Wed Sep 08, 2021 5:54 pm

Web Author Paste Special keyboard shortcut

Post by aabuan »

Hi,

I am looking for a way to add a keyboard shortcut for "Paste Special". I saw the post [1] about creating shortcuts for Paste as XML and Paste as TEXT using plugins but it's not what we need. Is it possible to add a keyboard shortcut key using the web framework? If not, is there another way to do it.

[1] post57792.html?hilit=paste%20special%20shortcut#p57792

Thanks,
Alice
Bogdan Dumitru
Site Admin
Posts: 157
Joined: Tue Mar 20, 2018 5:28 pm

Re: Web Author Paste Special keyboard shortcut

Post by Bogdan Dumitru »

Hello,

The id the the Paste Special action is "Author/PasteSpecial".
You can override the built-in action with a custom action that has a shortcut. The custom action can delegate to the built-in action that you can obtain from the ActionsManager like this: actionsManager.getActionById("Author/PasteSpecial").

See also https://www.oxygenxml.com/maven/com/oxy ... ction.html

Here https://github.com/oxygenxml/web-author ... /plugin.js you can find how to obtain the actionsmanager object.
Bogdan Dumitru
http://www.oxygenxml.com
aabuan
Posts: 12
Joined: Wed Sep 08, 2021 5:54 pm

Re: Web Author Paste Special keyboard shortcut

Post by aabuan »

Bogdan, thank you so much for your guidance. I used the web-author-paste-actions plugin, replaced the code in the plugin.js according to our requirements, and now it works! :D

You guys are the best!

Alice
Bogdan Dumitru
Site Admin
Posts: 157
Joined: Tue Mar 20, 2018 5:28 pm

Re: Web Author Paste Special keyboard shortcut

Post by Bogdan Dumitru »

Thank you for the kind words!
Bogdan Dumitru
http://www.oxygenxml.com
Post Reply