Possible to add paste-from-clipboard to Code Template variables?

Are you missing a feature? Request it's implementation here.
dsewell
Posts: 105
Location: Charlottesville, Virginia USA

Possible to add paste-from-clipboard to Code Template variables?

Fri Jan 27, 2017 11:28 pm

Would it be possible to extend the code template utility so that one can have the current system clipboard contents pasted into a specific point? For an example, I have a template that allows me to select text so I can add a target URL:

Code: Select all

<a href="${caret}">${selection}</ref>


That puts my cursor at the point where I can paste the clipboard manually. A nice shortcut for this would be

Code: Select all

<a href="${clipboard}">${selection}</ref>


so that the pasting happens automatically. I realize that it saves me only one keystroke but if I have to do this repetitively, any savings of time is helpful. If it would be easy to implement, perhaps consider.
Radu
Posts: 5208

Re: Possible to add paste-from-clipboard to Code Template variables?

Mon Jan 30, 2017 10:27 am

Hi David,

We do have some plans for such an editor variable, probably we'll do this in Oxygen 19.1 this summer. We'll update the forum thread when we do.
In the meantime we have API which allows registering resolvers for custom editor variables. And one of the sample Javascript-based plugins for Oxygen that I created:

https://github.com/oxygenxml/wsaccess-javascript-sample-plugins

is called customEditorVariables and it does exactly what you want, it expands the ${clipboard} editor variable.
So you can try to install that plugin.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dsewell
Posts: 105
Location: Charlottesville, Virginia USA

Re: Possible to add paste-from-clipboard to Code Template variables?

Mon Jan 30, 2017 5:39 pm

Very good, thank you!

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 1 guest