WoW:API SimpleHTML SetText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API SimpleHTML SetText to API SimpleHTML SetText without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
PLACEHOLDER CONTENT WHILE I WRITE A REAL PAGE:
{{widgetmethod|SimpleHtml}}
This method will set the SimpleHTML text content to the supplied text.


SimpleHTML:SetText("arg1");
== Parameters ==
=== Arguments ===
:("arg1")
:;arg1
:: String - Text that will be displayed in the SimpleHTML element.
=== Returns ===
:;nil
:: nil - Will always return nil.
== Details ==
The SimpleHTML element supports (as hinted by the name) a simple HTML-like markup. It also supports normal plain text with standard escape sequences. If the string does not contain the "<HTML><BODY>...</BODY></HTML>" structure (with only whitespace before the "<HTML>" tag) it will automagically revert to plain mode.
See [[UIOBJECT SimpleHTML]] for supported markup.
== See Also ==
* [[UI Escape Sequences]]
<!--
I'm keeping this one just to not delete information that can be important later.
------------------------------------
Accepts content in one of two forms.. "HTML" and "Plain"..
Accepts content in one of two forms.. "HTML" and "Plain"..


Line 7: Line 32:
HTML form uses a subset of HTML (You seem to be able to have WoW markup in the data) with the following tags:
HTML form uses a subset of HTML (You seem to be able to have WoW markup in the data) with the following tags:


HTML
&lt;HTML&gt;
BODY
&lt;BODY&gt;


Within the BODY tag, you can have:
Within the BODY tag, you can have:
H1
&lt;H1&gt;
H2
&lt;H2&gt;
H3
&lt;H3&gt;
P
&lt;P&gt;
BR  
&lt;BR&gt;
IMG
&lt;IMG&gt;


H1, H2, H3, and P are identical unless you've specified header fonts in the XML for the frame.
H1, H2, H3, and P are identical unless you've specified header fonts in the XML for the frame.
Line 26: Line 51:


I think most entities are supported, but I'm not sure. Non-ascii characters need to use the &#NNN; encoding (I think that's the right format)
I think most entities are supported, but I'm not sure. Non-ascii characters need to use the &#NNN; encoding (I think that's the right format)
----
-->
{{template:WoW API}}

Latest revision as of 04:47, 15 August 2023

Widget API ← SimpleHTML < SetText

This method will set the SimpleHTML text content to the supplied text.

SimpleHTML:SetText("arg1");

Parameters[edit]

Arguments[edit]

("arg1")
arg1
String - Text that will be displayed in the SimpleHTML element.

Returns[edit]

nil
nil - Will always return nil.

Details[edit]

The SimpleHTML element supports (as hinted by the name) a simple HTML-like markup. It also supports normal plain text with standard escape sequences. If the string does not contain the "<HTML><BODY>...</BODY></HTML>" structure (with only whitespace before the "<HTML>" tag) it will automagically revert to plain mode.

See UIOBJECT SimpleHTML for supported markup.

See Also[edit]