Web Author "Paste as XML" shortcuts

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
NicoAMP
Posts: 97
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Web Author "Paste as XML" shortcuts

Post by NicoAMP »

Hi,

In Oxygen Web Author, I would like to create a shortcut to "Paste special / Paste as XML" directly?
It seems that this operation doesn't exist in Author Action Dialog Box, so I can't associate a shortcut.

Is it possible to create this shortcut simply in a framework?
If not, is it possible at least to check radio button "Paste as XML" by default in "Paste special" dialog box?

Thanks for your help.
Nicolas Delobel
AmeXio
nicolas.delobel at group.amexio.net
cristi_talau
Posts: 494
Joined: Thu Sep 04, 2014 4:22 pm

Re: Web Author "Paste as XML" shortcuts

Post by cristi_talau »

Hello,

The "Paste as XML" action is a part of a bigger action - "Paste special" and it cannot be associated a shortcut by itself. Also the "Paste special" action is not configurable.

The actions are global actions that cannot be configured using the Document Type Dialog Box which control only the framework-specific actions. On the other hand, you can change shortcuts using the JS API [1].

On the other hand it is not hard to implement a custom action that implements "Paste as XML". I created a small plugin that replaces the "Paste Special" action with two individual actions: "Paste as Text" (Ctrl+Alt+T) and "Paste as XML" (Ctrl+Alt+X).

You can find it here: https://github.com/oxygenxml/web-author ... te-actions . You are free to modify it to suit your needs.

Best,
Cristian

[1] https://www.oxygenxml.com/maven/com/oxy ... onShortcut
NicoAMP
Posts: 97
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Re: Web Author "Paste as XML" shortcuts

Post by NicoAMP »

Hi Cristian,

I installed your plugin on my Web Author server but something strange appends.
When I used custom actions "Paste as text" and "Paste as XML" in right click menu, all is OK. Perfect :)
But when I try to use shortcuts :
  • Ctrl+Alt+T works only one time. When I try to reuse it nothing appends
  • Ctrl+Alt+X display message "Synchronizing with server" indefinitely and page is freezed
Do you know why?

Thanks.

Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at group.amexio.net
cristi_talau
Posts: 494
Joined: Thu Sep 04, 2014 4:22 pm

Re: Web Author "Paste as XML" shortcuts

Post by cristi_talau »

Hello,

There was a bug in the plugin - I forgot to call a callback. You can download it again now.

Best,
Cristian
NicoAMP
Posts: 97
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Re: Web Author "Paste as XML" shortcuts

Post by NicoAMP »

Hi Cristian,

Did you commit it on github?

Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at group.amexio.net
cristi_talau
Posts: 494
Joined: Thu Sep 04, 2014 4:22 pm

Re: Web Author "Paste as XML" shortcuts

Post by cristi_talau »

Hello,

Sorry. I pushed the changes now.

Best,
Cristian
NicoAMP
Posts: 97
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Re: Web Author "Paste as XML" shortcuts

Post by NicoAMP »

Thanks a lot Cristian.

Just a last remark: I still have the problem with Ctrl+Alt+X (message "Synchronizing with server" indefinitely and page freeze).

If I use an other shortcut for this action (e.g. Ctrl+Alt+P) I don't have the problem anymore.
Maybe it have a conflict with Ctrl+Alt+X shorcut...
Nicolas Delobel
AmeXio
nicolas.delobel at group.amexio.net
cristi_talau
Posts: 494
Joined: Thu Sep 04, 2014 4:22 pm

Re: Web Author "Paste as XML" shortcuts

Post by cristi_talau »

Hello,

You are right. The shortcut somehow interferes with the handling for Ctrl+X which means "Cut". I made some changes to the plugin to avoid this problem.

Best,
Cristian
Post Reply