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

Are you missing a feature? Request its implementation here.
dsewell
Posts: 125
Joined: Mon Jun 09, 2003 6:02 pm
Location: Charlottesville, Virginia USA

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

Post by dsewell »

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: 9434
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu »

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-j ... le-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: 125
Joined: Mon Jun 09, 2003 6:02 pm
Location: Charlottesville, Virginia USA

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

Post by dsewell »

Very good, thank you!
Post Reply