op.insert
| Syntax |
op.insert (string, direction)
|
| Params |
string is the heading to be inserted into the currently active outline. direction is a string containing the direction relative to the bar cursor in which the new heading is to be inserted. It may contain any of the following values: down - insert string at same level, beneath the target left - insert string one level higher right - insert string one level lower up - insert string one level higher
|
| Action |
Creates a new heading with the contents of string one step in the direction indicated from the bar cursor.
|
| Returns |
True if the operation succeeds, false if an error condition arises.
|
| Examples |
In examples.Sample Outline 1, place the bar cursor on the last line, "Summit 3," and execute: op.insert ("Summit 4", down) » true
A new heading at the summit level, labeled "Summit 4," appears below the "Summit 3" heading.
Nothing happens, because it is not possible to insert a heading to the left of a summit heading. |
| Errors |
Attempting an illegal insertion returns false but it is not an error.
|
| Notes |
The bar cursor is left on the newly inserted heading.
|
| See Also |
op.insertAtEndOfList
|