Page 1 of 1

Web Author "Paste as XML" shortcuts

Posted: Tue Apr 07, 2020 10:17 am
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.

Re: Web Author "Paste as XML" shortcuts

Posted: Tue Apr 07, 2020 5:29 pm
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

Re: Web Author "Paste as XML" shortcuts

Posted: Thu Apr 09, 2020 5:54 pm
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

Re: Web Author "Paste as XML" shortcuts

Posted: Thu Apr 09, 2020 5:59 pm
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

Re: Web Author "Paste as XML" shortcuts

Posted: Thu Apr 09, 2020 7:59 pm
by NicoAMP
Hi Cristian,

Did you commit it on github?

Regards,
Nicolas

Re: Web Author "Paste as XML" shortcuts

Posted: Fri Apr 10, 2020 10:15 am
by cristi_talau
Hello,

Sorry. I pushed the changes now.

Best,
Cristian

Re: Web Author "Paste as XML" shortcuts

Posted: Tue Apr 14, 2020 9:38 am
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...

Re: Web Author "Paste as XML" shortcuts

Posted: Tue Apr 14, 2020 1:57 pm
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