How to assign a keystroke to "Insert Tag" rather than "Surround with Tag"

Questions about XML that are not covered by the other forums should go here.
menkalos
Posts: 17
Joined: Wed May 13, 2015 11:59 pm

How to assign a keystroke to "Insert Tag" rather than "Surround with Tag"

Post by menkalos »

We use the <xref> tag extensively in our docs to link to topics in the same guide. There is no text, only a linkend and endterm attribute pair that we have to fill out.

I use this (and other similar tags) so often that I'd very much like to assign a keystroke to a general "Insert Tag" function that displays the valid tags at that point and lets me select one (identically to how "Surround With Tags" works) but without requiring that text is already selected.

How can I do that? Why do I have to have text pre-selected in order to insert a tag from the keyboard? As it stands, I have to use the mouse in the Elements pane. What a pain!

Please help! Thank you!!!
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to assign a keystroke to "Insert Tag" rather than "Surround with Tag"

Post by Radu »

Hi,

Could you tell me if you are editing content in the Text or in the Author visual editing mode?
Also, are you editing a custom XML vocabulary or is it Docbook? Because for Docbook we have in the Author visual editing mode special toolbar buttons for inserting links.
Anyway, in the Oxygen Preferences->Editor / Templates / Code Templates page you can create a code template (assign a name to a small piece of XML which can be inserted on demand) and if you are using Oxygen 17.1 or newer you can also assign a keyboard shortcut to it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply