RSS

Воскресенье, 22.12.2024, 07:15
Главная » WoW API » API Виджеты » Простой HTML »

SimpleHTML:SetText("text")

[ править ]
Sets the text to be displayed in the SimpleHTML frame.
[клоны]
Sets the text to be displayed in the SimpleHTML frame. Text for display in the frame can be formatted using a simplified version of HTML markup:

  • For HTML formatting, the entire text must be enclosed in <html><body> and </body></html> tags.
  • All tags must be closed (img and br must use self-closing syntax; e.g. <br/>, not <br>).
  • Tags are case insensitive, but closing tags must match the case of opening tags.
  • Attribute values must be enclosed in single or double quotation marks (" or ').
  • Characters occurring in HTML markup must be entity-escaped (&quot; &lt; &gt; &amp;); no other entity-escapes are supported.
  • Unrecognized tags and their contents are ignored (e.g. given <h1><foo>bar</foo>baz</h1>, only "baz" will appear).
  • Any HTML parsing error will result in the raw HTML markup being displayed.

Only the following tags and attributes are supported:

  • p, h1, h2, h3 - Block elements; e.g. <p align="left">
      align - Text alignment style (optional); allowed values are left, center, and right.

  • img - Image; may only be used as a block element (not inline with text); e.g. <img src="InterfaceIconsINV_Misc_Rune_01" />.
      src - Path to the image file (filename extension omitted).
    • align - Alignment of the image block in the frame (optional); allowed values are left, center, and right.
    • width - Width at which to display the image (in pixels; optional).
    • height - Height at which to display the image (in pixels; optional).

  • a - Inline hyperlink; e.g. <a href="aLink">text</a>
      href - String identifying the link; passed as argument to hyperlink-related scripts when the player interacts with the link.

  • br - Explicit line break in text; e.g. <br />.

Inline escape sequences used in FontStrings (e.g. colorStrings) may also be used.


Signature:
Code
SimpleHTML:SetText("text")

Arguments:
  • text - Text (with HTML markup) to be displayed (string)

Также смотрите: Простой HTML
Ссылки: http://wowprogramming.com/docs/widgets/SimpleHTML/SetText