Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Developer
lew
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
Accepted Solution

label with html content - supported tags?

In one of the beta release, Label could now handle some html content within its text data:

Label.setText("<html><p>asdf</p></html>")

 

But i haven't been able to find which html tags are supported...anyone saw a document regarding the supported tags or knows what are the supported tags?

 

<ul> and <h1> <h...> tags do not seem to work.

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: label with html content - supported tags?

They haven't documented any of this publicly yet, but there are some other things that work.

These include <br/>, <div> and <span>, <em> and <strong> (same as <i> and <b>), and you can set some basic color/font CSS styles with style="" on a given element.

I'm pretty sure we'll see this fully documented in the next beta coming out next week.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
Developer
lew
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha

Re: label with html content - supported tags?

thanks Peter...will wait for the next beta release ... hopefully the one on the 29th November!

 

Please use plain text.
Retired
erahnenfuehrer
Posts: 85
Registered: ‎05-25-2012
My Device: Limited Edition Z10

Re: label with html content - supported tags?

The supported tags are:

<a>

<b>

<br/>

<i>

<span>

<p>

<div>

<em>

<strong>

 

And the supported  CSS Properties are:

 

background-color

color

direction

font-size

font-style

font-weight

line-height

text-align

text-decoration

letter-spacing.

 

I hope to have a blog post up shortly with more details and examples.

 

Please use plain text.