Export Code Type:
Export Code Scope of Action:
Export Code First Added:
Export Code Last Altered:
^text( [item][, N] [, plain])^
The body (text and graphics) of the item or note, i.e. includes any existing mark-up. If a note name is not specified, 'this' is assumed as the focus. The parentheses my be omitted if no arguments are supplied.
^text^
exports the current note
^text(this)^
exports the current note
^text(/Tasks/Task1)^
exports the $Text of note at path '/Tasks/Task1'
^text("Task2")^
exports the $Text of note 'Task2'
Item can also be a string attribute holding a path or title of a note. Thus if $MyString has the value "Task2"
^text($MyString")^
exports the $Text of note 'Task2'
If the note only contains an image, the image's tag () is exported.
Alternative usages…
N words of $Text
The first N words of the text of the item or note, where N is a number (N.B. item must be specified too). Here the first 5 words of the current note's HTML-rendered $Text are inserted:
^text(this, 5)^
Alternatively, the first N words of the text of the item or note, without added HTML mark-up and where N is a number (again note that item must be supplied). Here the first 10 words of the current note's un-rendered $Text are inserted:
^text(this, 10, plain )^
Plain text export
If no HTML text mark-up is required. This inserts the $Text of the current note without any added HTML mark-up codes
^text(this, plain )^
N.B. The 'plain' option is still subject to the effects of $HTMLQuoteHTML and $HTMLMarkupText. For instance, if the latter is true
, then the phrase "This & that." will get exported as "This & that." which might not be as intended, e.g. if exporting via runCommand().
Alternatively, to get the text of the note, totally untouched by other processes (such as $HTMLQuoteHTML), use ^value($Text)^ which is effectively the same as ^text(this, plain)^.