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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
Developer
lew
Posts: 174
Registered: ‎03-05-2009
My Carrier: -
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: 5,630
Registered: ‎12-08-2010
My Carrier: none

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 -- (PlayBook 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 Carrier: -

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.
BlackBerry Development Advisor
erahnenfuehrer
Posts: 27
Registered: ‎05-25-2012
My Carrier: Bell

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.