This version is out of date, covering development from v7.0.0 to v7.5.6. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox 7 Icon

^text( item[, N, plain] )^


Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Data Include   [other codes of this type]

 item   [codes with similar scope]

 Baseline

 format"


^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. If the note only contains an image, the image's tag () is exported.

Alternative usages...

The first N words of the text of the item or note, where N is a number:

^text( item, N )^

Alternatively, the first N words of the text of the item or note, without added HTML mark-up and where N is a number:

^text( item, N, plain )^

If no HTML text mark-up is required.

^text( plain )^

The text of the current note without any added HTML mark-up codes - or use ^value($Text)^ instead. The code is effectively the same as ^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, use ^value($Text)^.