The most sophisticated control over text display is offered by SimpleHTML widgets. When its text is set to a string containing valid HTML markup, a SimpleHTML widget will parse the content into its various blocks and sections, and lay the text out. While it supports most common text commands, a SimpleHTML widget accepts an additional argument to most of these; if provided, the element argument will specify the HTML elements to which the new style information should apply, such as formattedText:SetTextColor("h2", 1, 0.3, 0.1) which will cause all level 2 headers to display in red. If no element name is specified, the settings apply to the SimpleHTML widget's default font.

Like ScrollingMessageFrame, SimpleHTML also provides hyperlink support, including a hook to control the formatting of hyperlinked text with :SetHyperlinkFormat. This function takes a string, which is provided to string.format along with strings representing the hyperlink's address and body text, and produces the appropriate link and color codes along with any other desired formatting.

This widget does not support scrolling by itself, but you can use it as a ScrollChild to support longer blocks of text. In addition, it is used by the stock UI to display the contents of the books that your character may find lying around inns and libraries.

Defined Methods

Inherited Methods

Script Handlers