[ https://issues.apache.org/jira/browse/FLEX-35180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687552#comment-15687552 ]
Josh Tynjala commented on FLEX-35180: ------------------------------------- As I recall, XML doesn't allow < and > characters in attributes, so this is not possible: <js:Button text="this is an <b>html</b> label"/> If you encode the characters, it doesn't look great, but that's probably the closest you'll get: <js:Button text="this is an &lt;b&gt;html&lt;/b&gt; label"/> > Allowed HTML in components > -------------------------- > > Key: FLEX-35180 > URL: https://issues.apache.org/jira/browse/FLEX-35180 > Project: Apache Flex > Issue Type: Bug > Components: FlexJS > Affects Versions: Apache FlexJS 0.8.0 > Environment: macOS Sierra > Reporter: Carlos Rovira > > The way FlexJS deal with HTML is not standardized and not working properly. > We need to make it work in general > From the thread in flexjs mailing list: > So anyway, what should work is in-line xhtml as the value of the html > property. IOW a plain text label should look like the following MXML: > <js:Button text="plain text label"/> > AFAIK, Button (and not js, only mdl) is the only control that allows "text" > has default property, but others not... maybe text based controls should do > this as well but not html. The example above works, and even you can declare > as: > <mdl:Button> > plain text label > </mdl:Button> > For a simple html label, you should be able to do: > <js:Button text="this is an <b>html</b> label"/> > This is not allowed (I tried even including some CDATA around, but not > compile with or without internal html tags > And this should also work, with or without [DefaultProperty] > <js:Button> > <js:html> > <h1>My Fancy Button</h1> > <p>With <span>this label</span></p> > <js:html> > <js:Button> > This not works but this is ok: > <mdl:Button> > <h1>My Fancy Button</h1> > </mdl:Button> > but only one tag as root, If append for example a <p> this will fail -- This message was sent by Atlassian JIRA (v6.3.4#6332)