Contextual Menu Actions in Text ModeEdit online
When editing XML documents in Text mode, Oxygen XML Editor plugin provides the following actions in the contextual menu (many of them also appear in the submenus of the Document menu):
Cut,
Copy,
Paste- Executes the typical editing actions on the currently selected content.
- Copy XPath
- Copies the XPath expression of the current element or attribute from the current editor to the clipboard.
Toggle
Comment (Ctrl + Shift + Comma (Command + Shift + Comma on OS
X))- Comments the current selection of the current editor. If the selection already contains a comment the action removes the comment from around the selection. If there is no selection in the current editor and the cursor is not positioned inside a comment the current line is commented. If the cursor is positioned inside a comment then the commented text is uncommented.
- Go to submenu
- This submenu includes the following actions:
Go to Matching Tag (Ctrl + Shift
+ G)- Moves the cursor to the end tag that matches the start tag, or vice versa.
- Go after Next Tag (Ctrl + CloseBracket (Command + CloseBracket on OS X))
- Moves the cursor to the end of the next tag.
- Go after Previous Tag (Ctrl + OpenBracket (Command + OpenBracket on OS X))
- Moves the cursor to the end of the previous tag.
- Select submenu
- This submenu allows you to select the following:
- Element
- Selects the entire element at the current cursor position.
- Content
- Selects the entire content of the element at the current cursor position, excluding the start and end tag. Performing this action repeatedly will result in the selection of the content of the ancestor of the currently selected element content.
- Attributes
- Selects all the attributes of the element at the current cursor position.
- Parent
- Selects the parent element at the current cursor position.
- Source submenu
- This submenu includes the following actions:
Shift
Right- Shifts the currently selected block to the right.
Shift
Left- Shifts the currently selected block to the left.
Indent selection (Ctrl + I (Command + I on
OS X))- Corrects the indentation of the selected block of lines if it does not follow the current indenting preferences.
Escape Selection- Escapes a range of characters by replacing them with the corresponding character entities.
Unescape Selection- Replaces the character entities with the corresponding characters.
Format
and Indent Element (Ctrl + Shift
+ I (Command + Shift + I on OS X))- Pretty-prints the element that surrounds the current cursor position.
- Convert Hexadecimal Sequence to Character (Ctrl + Shift + H (Command + Shift + H on OS X))
-
Converts a sequence of hexadecimal characters to the corresponding Unicode character. The action can be invoked if there is a selection containing a valid hexadecimal sequence or if the cursor is placed at the right side of a valid hexadecimal sequence. A valid hexadecimal sequence can be composed of 2 to 4 hexadecimal characters and may or may not be preceded by the
0xor0Xprefix. Examples of valid sequences and the characters they will be converted to:0x0045will be converted toE0X0125toĥ265toɥ2190to←Note: For more information about finding the hexadecimal value of a character, see Finding the Decimal, Hexadecimal, or Character Entity Equivalent.
- Base64 Encode/Decode submenu
- This submenu include the following actions for encoding or decoding base
64 schemes:
- Import File to Encode and Insert
-
Encodes a file and then inserts the encoded content into the current document at the cursor position.
- Decode Selection and Export to File
-
Decodes a selection of text from the current document and then exports (saves) the result to another file.
- Encode Selection
-
Replaces a selection of text with the result of encoding that selection.
- Decode Selection
-
Replaces a selection of text with the result of decoding that selection.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, a thin rectangle replaces the highlights and allows you to start editing. If matches with different letter cases are found, a dialog box is displayed that allows you select whether you want to modify only matches with the same letter case or all matches.
- Base32 Encode/Decode submenu
- This submenu include the following actions for encoding or decoding
base32 schemes:
- Import File to Encode and Insert
-
Encodes a file and then inserts the encoded content into the current document at the cursor position.
- Decode Selection and Export to File
-
Decodes a selection of text from the current document and then exports (saves) the result to another file.
- Encode Selection
-
Replaces a selection of text with the result of encoding that selection.
- Decode Selection
-
Replaces a selection of text with the result of decoding that selection.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, a thin rectangle replaces the highlights and allows you to start editing. If matches with different letter cases are found, a dialog box is displayed that allows you select whether you want to modify only matches with the same letter case or all matches.
- Hex Encode/Decode submenu
- This submenu include the following actions for encoding or decoding hex schemes:
- Import File to Encode and Insert
-
Encodes a file and then inserts the encoded content into the current document at the cursor position.
- Decode Selection and Export to File
-
Decodes a selection of text from the current document and then exports (saves) the result to another file.
- Encode Selection
-
Replaces a selection of text with the result of encoding that selection.
- Decode Selection
-
Replaces a selection of text with the result of decoding that selection.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, a thin rectangle replaces the highlights and allows you to start editing. If matches with different letter cases are found, a dialog box is displayed that allows you select whether you want to modify only matches with the same letter case or all matches.
- Join and Normalize Lines
- For the current selection, this action joins the lines by replacing the line separator with a single space character. It also normalizes the whitespaces by replacing a sequence of such characters with a single space.
Insert
XInclude- Displays a dialog box that allows you to browse and select the content to be
included and automatically generates the corresponding XInclude instruction.
Note: In the Author mode, this dialog box presents a preview of the inserted document as an author page in the Preview tab and as a text page in the Source tab. In the Text mode, the Source tab is presented.
Import entities list- Displays a dialog box that allows you to select a list of files as sources for
external DTD entities. The internal subset of the DOCTYPE declaration of your
document will be updated with the chosen entities. For instance, choosing the
files chapter1.xml and chapter2.xml
inserts the following section in the DOCTYPE:
<!ENTITY chapter1 SYSTEM "chapter1.xml"> <!ENTITY chapter2 SYSTEM "chapter2.xml">
- Canonicalize
- Opens the Canonicalize dialog box that allows you to select a canonicalization algorithm to standardize the format of the document.
- Sign
- Opens the Sign dialog box that allows you to configure a digital signature for the document.
- Verify Signature
- Allows you to specify the location of a file to verify its digital signature.
- Manage Highlighted Content submenu
- This submenu is available from the contextual menu when it is invoked from a highlight
after you perform a search operation or apply an XPath expression that highlights more
than one result. The following options are available in this submenu:
- Modify All
- Allows you to modify (in-place) all the occurrences of the selected content. A thin rectangle replaces the highlights and allows you to start editing. If matches with different letter cases are found, a dialog box is displayed that allows you select whether you want to modify only matches with the same letter case or all matches.
- Surround All
- Surround the highlighted content with a specific tag. This option opens the Tag dialog box. The Specify the tag drop-down menu presents all the available elements that you can choose from.
- Remove All
- Removes all the highlighted content.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the contiguous fragment where the cursor is located). When you use this option, a thin rectangle replaces the highlights and allows you to start editing. If matches with different letter cases are found, a dialog box is displayed that allows you select whether you want to modify only matches with the same letter case or all matches.
Go to
Definition (Ctrl
+ Shift + Enter)- Moves the cursor to the definition of the current element or attribute in the schema (DTD, XML Schema, Relax NG schema) associated with the edited XML document. If the current attribute is a “type” belonging to the “http://www.w3.org/2001/XMLSchema-instance” namespace, the cursor is moved in the XML schema to the definition of the type referenced in the value of the attribute.
- Refactoring submenu
- This submenu includes the following actions:
Rename
Element- The element from the cursor position, and any elements with the same name, can be renamed according with the options from the Rename dialog box.
Rename
Prefix (Alt + Shift + P
(Command + Shift + P on OS X))- The prefix of the element from the cursor position, and any elements with the same
prefix, can be renamed according with the options from the Rename
dialog box.
- If you select the Rename current element prefix option, the
application will recursively traverse the current element and all its children.
For example, to change the
xmlns:p1="ns1"association in the current element toxmlns:p5="ns1", if thexmlns:p1="ns1"association is applied on the parent element, then Oxygen XML Editor plugin will introducexmlns:p5="ns1"as a new declaration in the current element and will change the prefix fromp1top5. Ifp5is already associated with another namespace in the current element, then the conflict will be displayed in a dialog box. By pressing OK, the prefix is modified fromp1top5without inserting a new declaration. - If you select the Rename current prefix in all document option, the application will apply the change on the entire document.
- To also apply the action inside attribute values, select the Rename also attribute values that start with the same prefix checkbox.
- If you select the Rename current element prefix option, the
application will recursively traverse the current element and all its children.
For example, to change the
Surround with Tags (Alt + Shift +
E)- Allows you to choose a tag that encloses a selected portion of content. If there is no
selection, the start and end tags are inserted at the cursor position.
- If the Position cursor between tags option is selected in the Content Completion preferences page, the cursor is placed between the start and end tag.
- If the Position cursor between tags option is not selected in the Content Completion preferences page, the cursor is placed at the end of the start tag, in an insert-attribute position.
Surround with '[tag]' (Alt +
Shift + ForwardSlash)- Surround the selected content with the last tag used.
- Surround with <![CDATA]]> (Alt + Shift + C (Command + Alt + C on OS X))
- Surround the selected content with a
CDATAtag so that the parser will interpret it as textual data rather than markup.
Delete element tags (Alt +
Shift + Comma)- Deletes the start and end tag of the current element.
Split
element
- Split the element from the cursor position into two identical elements. The cursor must be inside the element.
Join
elements (Alt + Shift + F
(Command + Alt + F on OS X))- Joins the left and right elements relative to the current cursor position. The elements must have the same name, attributes, and attributes values.
- Attributes Refactoring Actions
- Contains built-in XML refactoring operations that pertain to attributes with some of
the information preconfigured based upon the current context.
- Add/Change attribute
- Allows you to change the value of an attribute or insert a new one.
- Convert attribute to element
- Allows you to change an attribute into an element.
- Delete attribute
- Allows you to remove one or more attributes.
- Rename attribute
- Allows you to rename an attribute.
- Replace in attribute value
- Allows you to search for a text fragment inside an attribute value and change the fragment to a new value.
- Comments Refactoring Actions
- Contains built-in XML refactoring operations that pertain to comments with some of the
information preconfigured based upon the current context.
- Delete comments
- Allows you to delete comments found inside one or more elements.
- DITA Refactoring Actions
- A variety of built-in XML refactoring operations that pertain to DITA documents with
some of the information preconfigured based upon the current context.
- Change Topic ID to File Name
- Use this operation to change the ID of a topic to be the same as its file name.
- Convert CALS Tables to Simple Tables
- Use this operation to convert DITA CALS tables to simple tables. If you invoke this operation from a nested table (a table inside a table), only the nested table will be affected. If it is invoked on a parent table that contains nested tables, all of the contained tables will be converted.
- Convert conrefs to conkeyrefs
- Use this operation to convert
conrefattributes toconkeyrefattributes. - Convert Simple Tables to CALS Tables
- Use this operation to convert DITA simple tables to CALS tables. If you invoke this operation from a nested table (a table inside a table), only the nested table will be affected. If it is invoked on a parent table that contains nested tables, all of the contained tables will be converted.
- Convert to Concept
- Use this operation to convert a DITA topic (of any type) to a DITA Concept topic type (for example, Topic to Concept).
- Convert to General Task
- Use this operation to convert a DITA topic (of any type) to a DITA General Task topic type (for example, Task to General Task). A DITA General Task is a less restrictive alternative to the Strict Task information type.
- Convert to Reference
- Use this operation to convert a DITA topic (of any type) to a DITA Reference topic type (for example, Topic to Reference).
- Convert to Task
- Use this operation to convert a DITA topic (of any type) to a DITA Task topic type (for example, Topic to Task).
- Convert to Topic
- Use this operation to convert a DITA topic (of any type) to a DITA Topic (for example, Task to Topic).
- Convert to Troubleshooting
- Use this operation to convert a DITA topic (of any type) to a DITA Troubleshooting topic type (for example, Topic to Troubleshooting).
- Rename Key
- Available when invoked on a key, and can be used to quickly rename a key. It also updates all references to it. Note that it does not work on DITA 1.3 key scopes.
- Elements Refactoring Actions
- Contains built-in XML refactoring operations that pertain to elements with some of the
information preconfigured based upon the current context.
- Delete element
- Allows you to delete elements.
- Delete element content
- Allows you to delete the content of elements.
- Insert element
- Allows you to insert new elements.
- Rename element
- Allows you to rename elements.
- Unwrap element
- Allows you to remove the surrounding tags of elements, while keeping the content unchanged.
- Wrap element
- Allows you to surround elements with element tags.
- Wrap element content
- Allows you to surround the content of elements with element tags.
- Fragments Refactoring Actions
- Contains built-in XML refactoring operations that pertain to XML fragments with some
of the information preconfigured based upon the current context.
- Insert XML fragment
- Allows you to insert an XML fragment.
- Replace element content with XML fragment
- Allows you to replace the content of elements with an XML fragment.
- Replace element with XML fragment
- Allows you to replace elements with an XML fragment.
- JATSKit Refactoring Actions
- Contains built-in XML refactoring operations that pertain to JATS documents with some
of the information preconfigured based upon the current context.
- Add BITS DOCTYPE - NLM/NCBI Book Interchange 2.0
- Adds an NLM 'BITS' 2.0 DOCTYPE declaration.
- Add Blue DOCTYPE - NISO JATS Publishing 1.1
- Adds a JATS 'Blue' 1.1 DOCTYPE declaration.
- Normalize IDs
- Assigned IDs are normalized and IDs are assigned to some elements that are missing them.
- Manage IDs submenu
- This submenu is available for XML documents that have an associated DTD, XML Schema,
or Relax NG schema. It includes the following actions:
Rename in- Renames the ID and all its occurrences. Selecting this action opens the Rename XML ID dialog box. This dialog box lets you insert the new ID value and choose the scope of the rename operation. For a preview of the changes you are about to make, click Preview. This opens the Preview dialog box, which presents a list with the files that contain changes and a preview zone of these changes.
- Rename in File
- Renames the ID you are editing and all its occurrences from the current file.
Search References- Searches for the references of the ID. By default, the scope of this action is the current project. If you configure a scope using the Select the scope for the Search and Refactor operations dialog box, this scope will be used instead.
- Search References in
- Searches for the references of the ID. Selecting this action opens the Select the scope for the Search and Refactor operations.
Search Declarations- Searches for the declaration of the ID reference. By default, the scope of this action is the current project. If you configure a scope using the Select the scope for the Search and Refactor operations dialog box, this scope will be used instead.
- Search Declarations in
- Searches for the declaration of the ID reference. Selecting this action opens the Select the scope for the Search and Refactor operations.
Search Occurrences in file- Searches for the declaration an references of the ID in the current document.
- Quick Assist (Ctrl + 1 (Command + 1 on OS X))
- Available when the cursor is inside an ID or IDREF, this action opens the Quick Assist window that allows you to select some search and refactoring actions for the selected ID or IDREF.
- Open File at Cursor
- Opens the file at the cursor position in a new panel. If the file path represents a directory path, it will be opened in system file browser. If the file at the specified location does not exist, an error dialog box is displayed and it includes a Create new file button that starts the New document wizard. This allows you to choose the type or the template for the file. If the action succeeds, the file is created with the referenced location and name and is opened in a new editor panel.
- Resource Hierarchy
- Opens the Resource Hierarchy/Dependencies view that allows you to see the resource hierarchy for an XML document.
- Resource Dependencies
- Opens the Resource Hierarchy/Dependencies view that allows you to see the resource dependencies for an XML document.