Shortcut for frequently used structured XML in Oxygen XML
This guide will help you implement frequently used templates in Oxygen XML.
For example, you might frequently create a list of three items. Rather than declaring the list, and it’s paragraphs every time, you can implement a shortcut. I recommend using a template that can be leveraged across many use cases.
An editor variable is a shorthand notation for context-dependent information, such as a file or folder path, a time-stamp, or a date. It is used in the definition of a command … to make a command or a parameter generic and re-usable with other input files.
— Oxygen XML, Editor Variables
Add a shortcut method
Use the following steps to create a code template that is frequently used in your documentation.
- Choose Options > Preferences.
- Choose Editor > Content Completion > Code Templates.
- Choose New.
- Add the following information to the Code template dialog:
- For the Name, enter a name related to the code template.
- For the Description, enter Wizard for adding CFN elements.
- Leave Associate with set to All editors.
- For the shortcut key, enter a shortcut key. For example, Ctrl+Shift+R (Windows) or Command+Shift+R (MacOS).
- Copy-paste the code below into the Content field.
- Choose OK.
- Choose Apply or OK to save the changes.
- Enter the shortcut key to run the wizard.
Update the code sample with your own template
Template to create unordered
list:
<ul>
<li>
<p/>
</li>
<li>
<p/>
</li>
<li>
<p/>
</li>
</ul>