Class HTMLText represents a variable-length string of up to 2 megabytes, designed to store HTML source. It’s a subclass of DBField; for more information about these database field classes works, see the DBField page.
static $db = array(
"Content" => "HTMLText",
);
The HTMLText constructor has no special arguments.
The following $ variables can be used in the template. Replace “Description” with the name of your database field.
$Description - Returns an
HTML-escaped version of the text.
$Description.ATT - Returns a copy of this text suitable for insertion into an
HTML attribute (
HTML code will be escaped).
$Description.RAW - Returns the plain text, with all
HTML stripped out.
$Description.FirstParagraph - Returns the first paragraph of the
HTML from this field.
$Description.FirstSentence - Returns the first sentence of the
HTML from this field.
$Description.LimitWordCount(50) - Returns the first 50 words of the
HTML from this field.
$Description.Summary(50) - Returns the maximum number of complete sentences that are less than 50 words, up to the first paragraph.
$Description.BigSummary(50) - Returns the maximum number of complete sentences that are less than 50 words (can return more than 1 paragraph).
$Description.NoHTML - Returns an
HTML Text Field without the
HTML. Useful for inserting into flash as well as a
HTML page
The Varchar class creates a MySQL field of type mediumtext character set utf8 collate utf8_general_ci.