2.3. Edit menu
Prev | 2. Menus | Next

### 2.3. Edit menu

### Tip

A simplified Edit menu will popup if the right mouse button is clicked anywhere in a document view. Some of the menu items of this popup Edit menu have more accurate titles than those of the menu bar Edit menu (example: "Undo Convert" instead of simply "Undo").

Undo

  Undo last command.

Redo

  Redo last undone command.

Repeat

  Repeats last repeatable command.

  Commands requiring the user to specify an argument (e.g. Replace, Insert Before, Insert, Insert After, Convert, Convert [wrap], Change Processing Instruction Target, etc) are repeatable.

Command History

  Displays a dialog box listing last ten repeatable commands from newest to oldest.

Cut

  Cuts

  - text selection

  - OR explicitly selected node or node range

  - OR implicitly selected element

  to system clipboard.

  ### Tip

  It is possible to cut and paste nodes between two instances of XXE (of course if the DTD or schema allows it).

Copy

  Copies

  - text selection

  - OR explicitly selected node or node range

  - OR implicitly selected element

  to system clipboard.

  ### Tip

  Selected characters are automatically copied as system selection on platforms supporting system selection (X-Window) and automatically copied to an internal clipboard on other platforms.

Paste Before

  Pastes the content of system clipboard before

  - explicitly selected node or node range

  - OR implicitly selected element.

  The system clipboard may contain one or several nodes or just plain text. The content of system clipboard, is parsed as XML if it begins with "`<?xml`" otherwise it is considered to be plain text.

Paste

  Pastes the content of system clipboard replacing

  - text selection

  - OR explicitly selected node or node range,

  OR if there is no explicit selection, pastes the content of system clipboard into

  - element containing caret, at caret position.

  The system clipboard may contain one or several nodes or just plain text. The content of system clipboard, is parsed as XML if it begins with "`<?xml`" otherwise it is considered to be plain text.

  ### Tip

  Clicking with mouse button #2 (middle button or mouse wheel) can be used to paste the content of system selection on platforms supporting system selection and can be used to paste the content of an internal clipboard on other platforms (if allowed by grammar constraining the document, of course).

  By default, this very handing feature is not enabled. You need to enable it using the Options dialog box.

Paste After

  Pastes the content of system clipboard after

  - explicitly selected node or node range

  - OR implicitly selected element.

  The system clipboard may contain one or several nodes or just plain text. The content of system clipboard, is parsed as XML if it begins with "`<?xml`" otherwise it is considered to be plain text.

Delete

  Deletes

  - text selection

  - OR explicitly selected node or node range

  - OR implicitly selected element.

Force Deletion

  Like Delete except that deletion will be performed even if the grammar constraining the document forbids to do so.

  Example 1. Example of use:

  The content model of element <a> is child element <b> or a sequence of child element <c> followed by child element <d>.

  A new <a> is by default created with the simplest possible content model, that is <b>. Then how to replace <b> by the sequence <c><d>? Deleting <b> is forbidden because it would give us an invalid <a>.

  The answer is:

  1. Force the deletion of <b> using the command described here. This makes <a> temporarily invalid but also relaxes the constraints on it.

  2. Insert a <c>.

  3. Insert a <d>. Element <a> is now valid.

Replace

  Displays the Edit tool which can be used to specify an element replacing

  - explicitly selected node or node range

  - OR implicitly selected element.

Insert Before

  Displays the Edit tool which can be used to specify an element inserted before

  - explicitly selected node or node range

  - OR implicitly selected element.

Insert

  Displays the Edit tool which can be used to specify an element inserted into

  - explicitly selected empty element

  - OR element containing caret, at caret position.

Insert After

  Displays the Edit tool which can be used to specify an element inserted after

  - explicitly selected node or node range

  - OR implicitly selected element.

Convert

  Displays the Edit tool which can be used to specify an element replacing

  - text selection

  - OR explicitly selected node or node range

  - OR implicitly selected element.

  Unlike Replace which creates an empty new element, Convert transfers the content of the selection to the new element which is the result of the conversion.

  More precisely, in the case of the node selection:

  - When a single element is selected, all its children (but not its attributes) are transferred to the result of the conversion.

    Example:

    "`<simpara>The <emphasis>little</emphasis> lamb.</simpara>`"

    converted to `<para>` gives

    "`<para>The <emphasis>little</emphasis> lamb.</para>`".

  - When several nodes or a single non-element node are selected, all these nodes are given a new parent element which is the result of the conversion.

    Example:

    "`<simpara>Once upon a time,</simpara>`"

    plus

    "`<simpara>the <emphasis>little</emphasis> girl.</simpara>`"

    can be converted to `<blockquote>` and that gives us

    "`<blockquote><simpara>Once upon a time,</simpara><simpara>the <emphasis>little</emphasis> girl.</simpara></blockquote>`".

  See also Wrap a variant of Convert.

Convert [wrap]

  This command is a variant of Convert. The unique difference between Wrap and Convert is that, with Wrap, when a single element is selected, the selected element is given a new parent element.

  Example, with Wrap (and not with Convert), it is possible to give a `<blockquote>` parent to the following `<simpara>`, when this `<simpara>` is implicitly or explicitly selected:

  "`<simpara>The <emphasis>little</emphasis> lamb.</simpara>`"

  That is, selecting `<blockquote>` using the Edit tool gives:

  "`<blockquote><simpara>The <emphasis>little</emphasis> lamb.</simpara></blockquote>`"

Split

  Splits explicitly selected element in two parts, the split point being specified by caret position.

  Unlike almost all other commands, this command requires the element to be explicitly selected.

  Keyboard shortcut (not displayed in menu): Esc+Enter.

  ### Tip

  A less generic form of the Split command is often bound to key Enter (for example, this is the case for XHTML and DocBook).

  Typing Enter inside a paragraph (that is, `<p>` for XHTML and `<para>` or `<simpara>` for DocBook) will split this element in two parts.

  Example: `<simpara>` is explicitly selected and the caret is in the middle of word "`little`". Splitting

  "`<simpara>the <emphasis>little</emphasis> girl.</simpara>`"

  gives us

  "`<simpara>the <emphasis>lit</emphasis></simpara><simpara><emphasis>tle</emphasis> girl.</simpara>`"

  ### Tip

  Therefore, typing Enter at the end of a paragraph will create an empty new paragraph after it.

  Typing Enter at the beginning of a paragraph will create an empty new pagraph before it.

Join

  Joins explicitly selected element to its preceding sibling, an element of same type. This gives a single element containing the child nodes of the two joined elements.

  This command is the inverse command of Split.

  Unlike almost all other commands, this command requires the element to be explicitly selected.

  Keyboard shortcut (not displayed in menu): Esc+Backspace. It is also possible to type Esc+Del to join explicitly selected element to its following sibling, an element of same type.

  ### Tip

  A less generic form of the Join command is often bound (for example, this is the case for XHTML and DocBook) to

  - key Backspace when the caret is at the beginning of a paragraph

  - and to key Delete when the caret is at the end of a paragraph.

  Typing Backspace at the beginning of a paragraph joins this element to the preceding paragraph.

  Typing Delete at the end of a paragraph joins this element to the following paragraph.

#### 2.3.1. Text menu

Insert Text Before

  Inserts text node before

  - explicitly selected node

  - OR implicitly selected element.

Insert Text

  Inserts text node into

  - explicitly selected empty element

  - OR element containing caret, at caret position.

Insert Text After

  Inserts text node after

  - explicitly selected node

  - OR implicitly selected element.

#### 2.3.2. Comment menu

Insert Comment Before

  Inserts comment node before

  - explicitly selected node

  - OR implicitly selected element.

Insert Comment

  Inserts comment node into

  - explicitly selected empty element

  - OR element containing caret, at caret position.

Insert Comment After

  Inserts comment node after

  - explicitly selected node

  - OR implicitly selected element.

#### 2.3.3. Processing instruction menu

Insert Processing Instruction Before

  Inserts processing instruction node (with a target called "`target`") before

  - explicitly selected node

  - OR implicitly selected element.

Insert Processing Instruction

  Inserts processing instruction node (with a target called "`target`") into

  - explicitly selected empty element

  - OR element containing caret, at caret position.

Insert Processing Instruction After

  Inserts processing instruction node (with a target called "`target`") after

  - explicitly selected node

  - OR implicitly selected element.

Change Processing Instruction Target

  Displays a dialog box that can be used to change the target of

  - explicitly selected processing instruction node

  - OR implicitly selected processing instruction node (that is the processing instruction node containing the caret).

#### 2.3.4. Reference menu

### About the Include tool feature

Some menu items are by default absent in this menu. You need to enable them by checking "Enable the Include Tool" in Options → Preferences, Features section.

Copy as Reference

  Copies to the clipboard a reference to the selected nodes (i.e. a pointer to selected nodes). This reference can be later pasted into another document[5], using any of the normal paste commands — Edit → Paste Before (Ctrl+U), Edit → Paste (Ctrl+V), Edit → Paste After (Ctrl+W) — in places where the grammar constraining the target document allows to do so.

  This command is enabled only for documents associated to a configuration declaring a inclusion scheme (see Section 12, “inclusionScheme” in XMLmind XML Editor - Configuration and Deployment). DITA documents use the `conref` inclusion scheme. DocBook and XHTML documents use the XInclude inclusion scheme.

  By default, it is possible to copy as a reference only an element having an ID attribute or the root element of a document. However, for documents using the XInclude inclusion scheme, this restriction may be relaxed by using Options → Preferences, Edit section, Allow advanced use of XInclude checkbox. When this option is turned on, it becomes possible to copy as a reference any range of sibling nodes.

  It is not possible to copy as reference the text selection, a reference, descendant nodes of a reference or any node selection directly containing one or more references. If you want to do so, simply use the normal Edit → Copy command, as this command preserves[6] existing references.

  ### Note

  The pasted reference cannot be edited in place. It is displayed with a light gray background to clearly indicate this. Use command Edit → Document Reference → Edit Referenced Document (or tool bar button ) to open a new window allowing to edit the document containing the referenced nodes.

Replace by Reference

  Replace by an element reference

  - text selection

  - OR explicitly selected node or node range.

  The element reference to be inserted in the document is specified using the Include tool.

Insert Reference Before

  Insert an element reference before

  - explicitly selected node or node range

  - OR implicitly selected element.

  The element reference to be inserted in the document is specified using the Include tool.

Insert Reference

  Insert an element reference

  - replacing text selection if any,

  - OR, if there is no text selection, insert an element reference in element containing caret, at caret position.

  The element reference to be inserted in the document is specified using the Include tool.

Insert Reference After

  Insert an element reference after

  - explicitly selected node or node range

  - OR implicitly selected element.

  The element reference to be inserted in the document is specified using the Include tool.

Include Text

  Displays a file chooser dialog box allowing to choose a text file (of any kind: XML, HTML, `.bat`, C/C++, etc). The content of this text file is then included in the document being edited at caret position.

  This kind of inclusion is implemented by the means of an `<xi:include parse="text">` element. Therefore, this command is disabled unless the document being edited supports the XInclude inclusion scheme.

Untransclude Reference

  Replaces included nodes by the inclusion directive (e.g. `xi:include` element).

  Any kind of selection inside the included nodes suffices to specify the subject of this command.

Retransclude Reference

  Inverse action of Untransclude Reference: replaces inclusion directive (e.g. `xi:include` element) by up-to-date included nodes.

  The inclusion directive must be explicitly or implicitly selected.

  Using untransclude allows to edit the inclusion directive by hand before retranscluding it. This is useful in the two following cases:

  - This allows to add attributes (typically an ID) to the `conref` elements created using Copy As Reference then Paste.

  - This allows to fine tune the `xpointer` attribute of the XIncludes created using Copy As Reference then Paste. Example: replace `xpointer="xpointer(id('disclaimer')/*[position() >= 1 and position() <= 8])"` by, simpler and more stable, `xpointer="xpointer(id('disclaimer')/*)"`.

Edit Referencing Document

  If current document is referenced by another document already opened in XXE and displayed in another window, this command brings the window of this other document to front. If there is no such referencing document, this command is silently disabled.

  Example 2. Example: book referencing chapters

  Book `book.xml` references chapters `chap1.xml`, `chap2.xml`, `chap3.xml`, etc, created in separate documents.

  Clicking anywhere inside first chapter displayed in the `book.xml` window then using command Edit → Document Reference → Edit Referenced Document (or tool bar button ) brings the window containing `chap1.xml` to front. (If needed, `chap1.xml` is opened in XXE.)

  Now being inside the `chap1.xml` window, using command Edit → Document Reference → Edit Referenced Document (or tool bar button ) brings the window containing `book.xml` to front.

Edit Referenced Document

  If the caret or the selection is inside a reference to an element contained in another document, this command brings the window of this other document to front. If the referenced document is not yet opened in XXE, this command will open it.

  See example above.

  ### Tip

  Shift-click on this menu item to open referenced document in read-only mode.

[5] It can also be pasted in the same document at another location.

[6] But, unlike Edit → Reference → Copy as Reference, it cannot create references.

Prev | Up | Next
2.2. Select menu | Home | 2.4. Search menu