This page discusses copying and pasting within Opal.
By and large, what is said here about Copy applies equally to Cut, so there is no separate discussion of cutting. — The basic menu commands mentioned on this page (Edit > Cut, Edit > Copy, Edit > Paste) are available also through the contextual menu that appears when you Control-click on a topic’s triangle.
As with everything in Opal, a distinction must be drawn between a topic and the text within a topic. And this distinction, if you’re copying and pasting entirely within Opal, must be drawn twice: once when copying, and again when pasting.
If you select text within a topic and choose Edit > Copy, you’re copying text. More precisely, you’re copying styled text (including any graphics), of a type suitable for pasting into a word processor application.
If you select a topic or topics as a whole and choose Edit > Copy, you copy an outline. In effect, what’s on the clipboard is similar to what would be saved into an Opal document file if the document consisted only of the selected topic(s). Thus, when the time comes later to paste, Opal knows very clearly that you copied a miniature outline, not mere text.
At the same time, Opal also puts onto the clipboard a plain text representation of the contents of this outline. This is so that you can switch to another application and have something on the clipboard to paste into it. This plain text representation is somewhat similar to what you get when you export as a text file: tab characters are used to express indentation, and text styling and pictures are stripped. (Labels are also stripped.)
If you checked the “Bullets in Clipboard” option in Opal’s preferences, extra characters are inserted at the start of every paragraph in this plain text representation. These characters are dictated by whatever appears in the “Bullets” field in the Labels dialog (even if labels are not being displayed in your outline). The illustration below shows a selected (and copied) topic in Opal, followed by what’s pasted into TextEdit if “Bullets in Clipboard” is checked (and the “Bullets” field in the Labels dialog contains a bullet and a hyphen, the default).
When you copy a topic, you copy its family along with it (its daughters, and their daughters, and so on). This is one of the basic principles of outlining. However, you can override this behavior by choosing Edit > Copy Topic Without Family. This copies a selected topic without its family. (You cannot, however, cut or move a topic without its family; that wouldn’t make sense.)
If there is text on the clipboard, Opal will paste as text (Edit > Paste). Thus:
If the selection is within the text of a topic, the pasted text will replace the selection (or will be inserted at the insertion point). The styling of the text on the clipboard is maintained; however, you may override this by choosing Edit > Paste and Match Style, in which case the styling of the text on the clipboard (along with any graphics) is stripped, and the styling of the text at the start of the selection is used instead.
If the selection is a topic, the pasted text will replace the entire text of the current topic.
However, if you wish, you can force the text on the clipboard to be treated as a topic or topics, and to be pasted as such. To do so, choose Edit > Paste Text as Topics. The text on the clipboard will be treated as plain text (styling is ignored, graphics are stripped). Multiple paragraphs will be pasted as multiple topics. Opal’s default behavior here is to insert as the next sister of the current topic; but if any paragraphs start with tab characters, the tab characters will be stripped and interpreted as indentation levels of the pasted topics (to whatever extent this can be done coherently), relative to the indentation level of the current topic.
If there is an outline on the clipboard (as the result of selecting entire topics and copying), Opal will insert it as the next sister of the current topic (Edit > Paste Topics).
However, if you wish, you can force the outline on the clipboard to be treated as text. To do so, select within the text of a topic, and choose Edit > Paste and Match Style. The plain text representation of the outline on the clipboard will be inserted into the topic.
Drag and drop may be used as a sort of shortcut for cut and paste (or copy and paste), and has the advantage of leaving the clipboard untouched. Also, there are certain actions (such as inserting a document link) that can be performed only through drag and drop.
Within an Opal document:
Selected text can be dragged within the same topic. Add the Option key to copy instead of moving the text.
Selected text can be dragged out of its topic into the outline; in this case, it is copied, and becomes a new topic (you cannot drag text from one topic into another existing topic).
Selected topics can be dragged as a way of reorganizing the outline. Add the Option key to copy instead of moving the topic(s).
Between Opal documents:
From Opal to another application:
From another application to Opal:
If a topic is selected in Opal, dragging text from another application into Opal results in a single new topic (even if the text consists of multiple paragraphs).
If text within a topic is selected in Opal, dragging text from another application into Opal can additionally insert the text into the topic.
In both the above cases, text styling and pictures are generally preserved, but the details will depend upon the sending application.
Furthermore, you can drag a file from the Finder into the topic:
If the file is a picture file, the default behavior is to display the picture in Opal. If you hold down the Control key, however, you can specify that you want a link (alias) to the file instead.
Otherwise, the result is a link to the file. Links are a good way of using Opal to help you organize your access to files on disk; you can double-click the link to open the original file, or ⌘-double-click the link to reveal the file in the Finder.
From Opal to the Dock:
You can drag either selected text or selected topics onto an application’s icon in the Dock. How the application will respond depends upon the particular application. For example, if you drag onto TextEdit’s icon, TextEdit creates a new document and the dragged material is pasted into it. If you drag onto Safari’s icon, Safari performs a Google search for the dragged text.
If you drag onto the Trash icon in the Dock, the selected material in Opal is deleted.