Outline

The Outline lies at the heart of everything you do in OmniOutliner. It’s where you compose and arrange content, it reflects the styles you choose with the Sidebar and Inspectors, and it is built on a hierarchy of rows that gives exactly the structure you want for your data.

An outline in OmniOutliner Pro is composed of one or more rows and one or more columns, with data entered into the cells created by their intersection. The Topic column can additionally display rows in hierarchy, offering the ability to create sophisticated outline structures.

Outline Properties

Here are the properties of an instance of the Outline class:

Outline Methods (functions)

Here are methods for use with an instance of the Outline class:

As an example, assume you have a document with a enumeration column named “Type”. Use of the organize function will rearrange the leaf items into groups based on their value in the Type column. Any previously created Type groups that have no entries will be removed.

Group | Ungroup

The group() and ungroup() methods enable the creation and dissolution of item parent/child groups.

Create New Group with Selected Rows


editor = document.editors[0] if(editor.selectedNodes.length > 0){ selectedItems = editor.selectedNodes.map(node => node.object) newItem = document.outline.group(selectedItems) newItem.topic = "NEW GROUP ITEM" }
group-before-after
Ungroup Selected Items


editor = document.editors[0] if(editor.selectedNodes.length > 0){ selectedItems = editor.selectedNodes.map(node => node.object) document.outline.ungroup(selectedItems) }
ungroup-before-after

Top Items

Given an array of Items in an Outline, return the subset of Items that are not descendants of some other element of the array.

The following script shows which of the selected items are top items by appending the string “<-- TOP ITEM” to the each of the top items.

top-items-before
Append Label to Top Items


editor = document.editors[0] selectedItems = editor.selectedNodes.map(node => node.object) if(selectedItems.length > 0){ tItems = document.outline.topItems(selectedItems) for (item of tItems){ item.topic = item.topic + ' <-- TOP ITEM' } }
top-items-after