In examples.Sample Outline 2, place the bar cursor on "Subhead 1.1" and then execute:
op.insertAtEndOfList ("New Heading")
» true
The new heading appears at the same level as Subhead 1.1.1 (the third level), and is labeled "New Heading."
In examples.Sample Outline 2, place the bar cursor on "Subhead 1.1.1.1.1" and then execute:
op.insertAtEndOfList ("New Level 7 heading")
» true
The new heading appears indented from Subhead 1.1.1.1.1, at the seventh level of the outline, and is labeled "New Level 7 heading."
In examples.Sample Outline 1, position the bar cursor on "Subhead 3, Summit 2" and then execute:
s = op.getLineText ();
op.go (left, 1);
op.insertAtEndOfList (s)
» true
A new line, also labeled "Subhead 3, Summit 2" is inserted after the heading "Subhead 4, Summit 2." When subheads are similarly labeled, you can use this method of creating new lists of entries and then you can manually edit them later.