HTML read wrong

I can't configure my html code correctly in my text element. I want:

It works in a single html page, but not in the text element, with HTMLFormat active.

<!DOCTYPE html>
<p><span style="color:#FF0000;">♦<br><span style="color:#C0C0C0;">A<br><span style="color:#C0C0C0;">K<br><span style="color:#C0C0C0;">D<br><span style="color:#C0C0C0;">J

The text element is shown as all in red.
Also, when I read the length of the string, in my function, it should read the raw code instead of the formatted text.

  1. How can I show it correctly?
  2. How can I get the length for example of the whole raw string?

You will have to use the webviewer, the label cannot handle all the html/css styling you require.

See here: App Inventor Code Snippets | Pura Vida Apps and here: App Inventor Code Snippets | Pura Vida Apps

oh, I had to close the span tag for the right colors and I had to use the object.HTMLContent property instead of Text property.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.