Code templates are code fragments that can be inserted at the current editing position. Oxygen XML Editor comes with a set of built-in templates for CSS, LESS, Schematron, XSL, XQuery, and XML Schema document types. You can also define your own code templates and share them with your colleagues using the template export and import functions.
To configure Code Templates, open the Preferences dialog box and go to .
This preferences page contains a list of all the available code templates (both built-in and custom created ones) and a code preview area. You can disable any code template by deselecting it.
The following actions are available:
| Parameter | |
|---|---|
| url | Format: ${ask('message', url, 'default_value')} |
| Description: Input is considered a URL. Oxygen XML Editor checks that the provided URL is valid. | |
Example:
|
|
| password | Format: ${ask('message', password, 'default')} |
| Description: The input is hidden with bullet characters. | |
Example:
|
|
| generic | Format: ${ask('message', generic, 'default')} |
| Description: The input is considered to be generic text that requires no special handling. | |
Example:
|
|
| relative_url | Format: ${ask('message', relative_url, 'default')} |
| Description: Input is considered a URL. Oxygen XML Editor
tries to make the URL relative to that of the document you are
editing. Note: If the $ask editor variable is expanded in
content that is not yet saved (such as an untitled file, whose
path cannot be determined), then Oxygen XML Editor will transform it
into an absolute URL.
|
|
|
Example:
|
|
| combobox | Format: ${ask('message', combobox, ('real_value1':'rendered_value1';...;'real_valueN':'rendered_valueN'), 'default')} |
| Description: Displays a dialog box that offers a drop-down menu.
The drop-down menu is populated with the given rendered_value
values. Choosing such a value will return its associated value
(real_value). Note: The 'default' parameter
specifies the default selected value and can match either a key or a
value.
|
|
Example:
|
|
| editable_combobox | Format: ${ask('message', editable_combobox, ('real_value1':'rendered_value1';...;'real_valueN':'rendered_valueN'), 'default')} |
| Description: Displays a dialog box that offers a drop-down menu
with editable elements. The drop-down menu is populated with the given
rendered_value values. Choosing such a value will return
its associated real value (real_value) or the value inserted
when you edit a list entry. Note: The 'default' parameter
specifies the default selected value and can match either a key or a
value.
|
|
Example:
|
|
| radio | Format: ${ask('message', radio, ('real_value1':'rendered_value1';...;'real_valueN':'rendered_valueN'), 'default')} |
| Description: Displays a dialog box that offers a series of radio
buttons. Each radio button displays a 'rendered_value and
will return an associated real_value. Note: The
'default' parameter specifies the default selected value
and can match either a key or a value.
|
|
Example:
|