This is the main working part of a note and where is body copy ($Text) is edited and displayed. The text is RTF and supports RTF styles. The available text area customisations and controls are a sub-set of those that will be familiar from Apple's TextEdit app.
Altering the look of note text
A number of text area functions are controlled by/stored as attributes. These are system attributes mostly in the TextFormat and Textual groups. It is important to note that all text is styled. Thus these note-scoped attribute values controlling the text font and size have no further effect once the text area is first edited. However, the Format ▸ Style submenu has option for resetting selected text back to the attribute stored values.
To set non-inherited font face (the 'name' of the font) or size or colour use the OS Fonts dialog. Styling like bold, italic, or underline use normal macOS shortcuts and can also be accessed via the Format menus, as can things like sub-/super-script, and enabling rulers and tab-bars. Colour and highlights colour values may also be set via attributes.
Some further options are available via the right-click context menu with options varying depending on wether there is text selected or no selection.
The Text Inspector's 'Text' tab controls a number of note-level text settings so in not the place to look for in-text style controls.
Displaying note text in map view icons
This aspect of text display is described under Map view, see here.
Text Selection
Text selection methods:
- Select the adjacent line: click in the left margin of the text pane.
- Select the adjacent paragraph: double-click in the left margin of the text pane.
- Extend the existing selection: shift-clicking and shift-double-clicking extends the current selection to encompass the adjacent line or paragraph.
Rules and Edicts are updated when the text of a note is edited.
Sorting lines (paragraphs) in $Text
When editing text in the text pane, it is sometimes useful to sort lists. Menu Edit ▸ Transformations ▸ Sort now sorts the selected lines in the text pane, using the local standard sort comparator.
Find & Replace
The text area has its own discrete Find and Replace features including highlighting of Find results. A ruler can be displayed for the text area.
Exporting Styled Text
Though only a subset of the full range of RTF styling is supported for HTML export, fully styled RTF text export is supported via text export (note the latter only supports a limited range of export codes).
Text Font, Size and Colour
When $Text is first edited it uses its inherited of set $TextFont, $TextFontSize and $TextColor, i.e. the defaults. Importantly, this results in RTF text saved using those values. As a result, changing those defaults has no effect on existing text in the $Text. To restyle (selections of) the existing $Text or to re-impose the defaults see the Format ▸ Style or Format ▸ Font menus.
Avoid Importing Source Text Style
When importing test, to avoid source styles carrying across (e.g. copying from a web page) rather than use the Paste (⌘+V) command use Paste and Match Style ( ⌘+⌥+⇧+V). This will retain bold and italic styles but lose font type/size/colour from form source.
Thus when importing test from outside Tinderbox it is generally best to use Paste and Match Style unless it is certain that external formatting is needed.
Action Code and Styled Text
Several string operations can be applied to styled text from $Text, or to text destined for $Text, in order to modify the (rich) text styling. Note that while any string may have its style set, this styling only has an effect when viewed in $Text.
When an action assigns the $Text of one note to another, Tinderbox preserves styling.
$Text = $Text("/configuration/example")
When the text of two notes are appended, Tinderbox preserves styling.
$Text = $Text(/a)+$Text(/b)
A string may be emboldened or italicised:
$Text=$DisplayName.bold
$Text=$MyString.italic
The font size of a string may be changed:
$Text=$MyString.fontSize(36)
The following operators also respect style information:
- String.replace()
- String.substr()
- String.paragraphs()