Rich Text

GetPlainText

Description

Returns a plain text rendition of the contents of a rich text object - that is, without styles, formatting, etc.

Syntax

strText = rt:GetPlainText([bIncPrivate[, bRemBrackets]])

Parameters

bIncPrivate
boolean:Optional.  Defaults to true if not specified.  Set this to false if you do not wish private text (text enclosed in doubled-square brackets like [[this]]) to be included.
bRemBrackets
boolean:Optional.  Defaults to false if not specified.  If set to true and bIncPrivate is true, the doubled square brackets around private notes will be removed.  Has no effect if bIncPrivate is not true. 

Return Value

sText
string: a plain text rendition of the contents of a rich text object - that is, without styles, formatting, etc

Remarks

Example
rt = fhNewRichText()
rt:SetText("An <u>important</u> point")
sPlainText = rt:GetPlainText()
fhMessageBox(sPlainText)   -- displays "An important point"