b and i tags not working in StyleableTextField for mobile development

I'm trying to dynamically produce TextArea instances in a Flex mobile app that implement html formatting.  I've made a lot of progress, but simple <b> and <i> tags are not being rendered correctly. 
My current hypothesis is that I need to embed the italic and bold fonts.  I am currently not embedding fonts for these particular TextArea instances at all -- they are rendering using the system font.  In my previous experience, this eliminates problems with rendering <b> and <i> text.  However, when deploying on mobile platforms, I don't know for sure if there is a bold or italic system font natively available. 
If I need to embed the bold and italic fonts for the tags to process correctly, does anyone know which font(s) I should embed and how I should name them so that the html will be able to find them and render correctly?  I am applying a CSS to these TextArea instances in the full app, so I can do any font embedding there if necessary.  I am planning to compile this app for both iOS and Android, in case that makes a difference. 
Below is a simplified example of the code I'm using.  The TextArea that is generated is formatted honoring the <br /> tags, but ignoring the <b> and <i> tags. 
Thanks in advance for any help. 
import mx.events.FlexEvent;
import spark.components.TextArea;
import spark.components.supportClasses.StyleableTextField;
import spark.skins.mobile.TextAreaSkin;
protected function application1_creationCompleteHandler(event:FlexEvent):void
          var textArea0:TextArea = new TextArea();
          textArea0.setStyle("skinClass", TextAreaSkin);
          addElement(textArea0);
          var styleableTextField0:StyleableTextField = StyleableTextField(textArea0.textDisplay);
          styleableTextField0.multiline = true;
          styleableTextField0.htmlText = "<b>bold</b><br /><i>italic</i><br />normal";

Huh!  I tried tracing the htmlText property after formatting, and the bold and italic tags are not there anymore.  Unexpected, but consistent with the results.  Thanks for suggesting that test.  Here is the line where I assign the htmlText property:
styleableTextField0.htmlText = "normal<br/><i>italic</i><br/><b>bold</b><br/><a href='http://www.google.com/'>link</a>";
Here is the section where I create the StyleSheet and assign it to the StyleableTextField:
var styles:String =
  "@font-face{ fontFamily: Arial; src: url('assets/fonts/Arial.ttf'); embedAsCFF: false;}" +
  "@font-face{ fontFamily: Arial; src: url('assets/fonts/Arial Italic.ttf'); fontStyle: italic; embedAsCFF: false;}" +
  "@font-face{ fontFamily: Arial; src: url('assets/fonts/Arial Bold.ttf'); fontWeight: bold; embedAsCFF: false;}" +
  "a { color: #FFE043; textDecoration: underline; } " +
  "a:active{ color: #ffffff;}" +
  "b{fontWeight:bold; fontFamily: Arial;} " +
  "i{fontStyle:italic; fontFamily: Arial;}";
var myStyleSheet:StyleSheet = new StyleSheet();
myStyleSheet.parseCSS(styles);
styleableTextField0.styleSheet = myStyleSheet;
And here is the trace statement
trace( styleableTextField0.htmlText); // <TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">normal</FONT></P></TEXTFORMAT><TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">italic</FONT></P></TEXTFORMAT><TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">bold</FONT></P></TEXTFORMAT><TEXTFORMAT RIGHTMARGIN="21" INDENT="10" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="16" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0"><A HREF="http://www.google.com/" TARGET="">link</A></FONT></P></TEXTFORMAT>
Lots of code modification going on behind the scenes, it would seem.  Any idea as to why the bold and italic tags are being stripped out when the formatting process happens?  Any idea of what steps I could take next?  Thanks for all your help so far! 
BTW, here's a screen capture of what the text looks like at this point:

Similar Messages

  • I have downloaded the latest Adobe Flash on my laptop and it is not working on safari for youtube.I have uninstalled and installed it multiply times and it still wont show me youtube videos

    I have downloaded the latest Adobe Flash on my laptop and it is not working on safari for youtube.I have uninstalled and installed it multiply times and it still wont show me youtube videos

        Enable Plug-ins
        Safari > Preferences > Security
        Internet Plug-ins >  "Allow  plug-ins"
        Enable it.
        Press " Manage Website Settings" button for more options.

  • Cut and Paste will not work

    I have a Toshiba Satellite/Satellite Pro C50-A series laptop I bought new in December 2013. It has Windows 8 on it. I did the upgrade to windows 8.1 almost immediatley so I cannot remember if my control c / control v, cut and paste worked in 8 or not. But it will NOT work in 8.1 for most of my programs. I desperately need it to work on my All My Movies database software from Bolide software and my Green Eclipse sticky notes. And cut and paste will NOT work AT ALL for those programs. It works sometimes for my email and my Apache Open Office word processor.
    I have contaced microsoft who's tech did something Tuesday morning to get it working. But then I booted down my computer and went to bed and when I booted it up, yep, no more cut and paste ability again! So I tried contacting microsoft this morning around 2:30am and they said it was an OEM problem and to contact Toshiba.
    I have even run a sfc /scannow twice and get the same error message:
    sfc /scannow      ran 1/22  1:30am
    results: windows resource protection found corrupt files but was unable to fix some of them. details are included in the CBS.Log windir\Logs\CBS\CBS.log
    for ex c:\windows\Logs\CBS/CBS.log
    note that logging is currently not supported in offline servicing scenarios
    The above error message I WAS ABLE to cut and paste FROM my green eclipse sticky note to this forum! But when I tried to cut and paste this message back to a NEW sticky note......NOTHING!
    I hope someone here can provide a permanent solution to fix this! It may seem minor but I do a LOT of cut/pasting!
    frustrated!!!!
    lisa

    There are dozens of possibilities, Lisa.
    Which C50-A do you have? There is a label on the bottom.
    What security applications do you have installed? Webroot is a common offender.
    Do you have Microsoft Office installed? If so, which version?
    Do you use Bluetooth?
    Did you upgrade to Windows 8.1 properly, following carefully the instructions here?
       How to Update from Windows 8 to Windows 8.1
    Find a situation that always gives you trouble, so that know when we learn something.
    Then see if that trouble occurs after a clean boot.
       1. Open the System Configuration utility (msconfig.exe). You can do that by typing msconfig at the Start screen and pressing Enter.
       2. On the Services tab, set the Hide all Microsoft services check box and then click Disable all.
       3. On the Startup tab, click Open Task Manager, right-click and disable each Startup item. Then close Task Manager.
       4. Back on the System Configuration screen, click OK, and restart the computer.
    -Jerry

  • Sinds I install Lion Previeuw and textedditor is not working

    Sinds I install Lion, the texteditor and previeuw Is not working anymore.
    For reading PDF's I install Adobe reader and that is not a problem.
    Has anyone  any idear how to fix this problem.
    Stef

    So you launch Safari and what? Provide a link to the google site that's not working for you. Update to the latest version of Flash Player. Make sure it's on in System Preferences>Flash Player.

  • Padding and margin does not work in div.

    padding and margin does not work in div.
    though design field  shows me padding effect, but at the web browser it does not work.
    please let me know how to deal it.

    Your HTML code is missing a closing div.  I have just done a rough check on it and came out with this code:
    <div class="wrapper">
    <div class="container1">
      <div id="header">
      <!-- end .header -->
      <img height="45" src="n_image/coaraSmall.jpg" width="53" /></div>
      <div id="top">
      <div id="top_inner1">
        <div id="top_inner2">
        <div id="top_inner3">
          <div id="top_inner4">
          <div id="slider1">
            <a class="buttons prev" href="#"></a>
            <div class="viewport">
            <ul class="overview">
              <li><img src="n_image/nora_big.jpg" /></li>
            </ul>
            </div>
            <a class="buttons next" href="#"></a></div>
          <!-- end .top_inner4 --></div>
          <!-- end .top_inner3 --></div>
        <!-- end .top_inner2 --></div>
        <!-- end .top_inner1 --></div>
      <!-- end .top --></div>
      <div id="menue">
      <div id="menue_inner1">
        <div id="globalnavi">
        <ul>
          <li><a href="#">Home</a></li>
          <li><a href="#">Song 4 Happy</a></li>
          <li><a href="#">About</a></li>
          <li><a href="#">Contact</a></li>
          <li><a href="#">Other</a></li>
          <li></li>
        </ul>
        <div class="c-both">
        </div>
        </div>
        <!-- end .menue_inner1 --></div>
      <!-- end .menue --></div>
      <!-- end .container1 --></div>
    <div class="container2">
      <div id="main">
      <div id="main2">
        <div align="center">
        <img height="297" src="n_image/noira002.jpg" width="600" />
        </div>
        <table class="category_01">
        <tr>
          <td>
          <img height="178" src="n_image/noira002_1.gif" width="180" /></td>
          <td>
          <img alt="" height="178" src="n_image/noira002_1.gif" width="180" /></td>
          <td>
          <img alt="" height="178" src="n_image/noira002_1.gif" width="180" /></td>
        </tr>
        </table>
        <div id="step">
        I hope it is going to be good. </div>
        <!-- end .main2 --></div>
      <!-- end .main --></div>
      <div id="footter">
      <div class="inner">
        <div class="footerLogo">
        <img height="92" src="n_image/side_rogojpg.jpg" width="150" /></div>
      </div>
      <!-- end .container2 --></div>
      <!-- end .wrapper --></div>
    </div>
    You need to copy and paste the above code in the body of your editor window and the css styles will start to work again.
    Please note this is a rough check only so you need to see if the closing div tag is in the right place.

  • ScriptLink tag not working for application page sharepoint 2010

    <ScriptLink> tag not working for application page sharepoint 2010 for including javascript in application page, it appends either 1033 or _layout to path specified for javascript.But javascripts are located in custom document library on site and not
    in _layouts folder.
    Please help and explain in details as I tried lot on this.

    Hi,
    Use the following line of code
    <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/js/functions.js" Language="javascript" />
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

  • I am on windows 7 and I upgraded to 10.0.2 and now it will not open. I have removed firefox completely and uploaded it again and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version and once again nothing.

    I am on windows 7 and I upgraded to the newest verison of firefox and now it will not open. I have removed firefox completely and uploaded it again and that did not work. I then made sure it could get through my firewall and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version hoping that would do it and once again nothing. It will not open at all. Please help - is there a live chat or a number to talk to someone at Firefox?

    I think when uninstalling you may also have to choose (tick) to delete the preferences and other personal data like the bookmarks, stored passwords etc. to erase completely. If you are installing afresh, please try right-clicking on the file and '''Run as administrator''' to install. And when uninstalling, please also make sure choose to delete all data and also manually delete any '''Mozilla''', '''Mozilla Firefox''' or '''Firefox''' from %appdata%, %localappdata% and %programfiles%. You can open a location by typing for eg. %appdata% in the '''Run''' box (Windows key + R). You may also have to check the '''VirtualStore''' folder in %localappdata%. Files in the VirtualStore can be problematic. I think a clean installation may help.
    [https://www.mozilla.org/en-US/firefox/new/ Firefox]
    [http://kb.mozillazine.org/Installation_directory Installation Folder]
    [http://kb.mozillazine.org/Profile_folder Profile Folder]
    Please note that using system restore would usually damage the Firefox installation.

  • I've just updated my iPhone to the new iPhone OS and now it won't work and iTunes won't recognise that it's there.  I've uninstalled iTunes and reinstalled twice and it's not working.  Please help.

    I've just updated my iPhone to the new iPhone OS and now it won't work and iTunes won't recognise that it's there.  I've uninstalled iTunes and reinstalled twice and it's not working.  Please help.

    I have not had wifi since November when I upgraded to the newest IOS version.  I called the Apple help line and they told me some things to do and I tried them all and they worked for a few hours and then wifi shut off again.  I kept doing what they told me and it worked for a couple more days and then I could never turn it on again.  My blue tooth doesn't work either.  I had to actually increase my data usage with AT&T becuase of this.  When I did that in December I went to the Apple store and was told that it is a hardware issue and since my phone is out of warranty I would have to pay for a new phone because they could not fix the issue.  My upgrade isn't up until June 2014 so not only do I have to wait for the upgrade and I am not paying for a new phone but I have to pay $10 plus extra a month on my cell phone bill because I was going over on my Data!!!  I have been beyond upset about this and Apple is not doing anything about this nor did they offer up some way to resolve the issue because obviously it is not just some rare incident if several people are having this issue.  Who knows how many people out there have had this issue and have not said anything about it.  Now there is a newer update that I can't do because it requires wifi in order to download.
    June can not get here fast enough and I may not go back to Iphone after dealing with this for so long with no help from Apple.

  • YouTube will not work on safari for me on the ipad. Is there anyway to fix this? I can go anywhere else on the internet fine and it works on google chrome, but on safari it shows a blank screen with the bar on top after it loads.

    YouTube will not work on safari for me on the ipad. Is there anyway to fix this? I can go anywhere else on the internet fine and it works on google chrome, but on safari it shows a blank screen with the bar on top after it loads, if it's even loading at all.
    I do not know if it's relevant or not, but I got a message on my ipad while on safari saying that my iPhone has a virus. I looked it up and it seems it might have just been an ad from the website I was on, but it happened around the same time YouTube stopped working.

    You will find that using the YouTube app will provide a better viewing experience for YouTube videos.

  • Keyboard and trackpad are not working, Keyboard and trackpad are not working

    I'm using MBP 15" late 2008 with Maverick OS. A couple of days ago, the internal keyboard and trackpad are not working at all. I did all the troubleshooting. I even reformat it; installing the snow leopard and re-installing the maverick but no good result. I believe there's no problem with my keyboard because i can still do PRAM on my lappy. Everytime i'm booting up my MBP, it always looking for bluetooth trackpad and keyboard. I have not used those bluetooth peripherals from day 1 i've started using MBP. I just read on the internet about the same problem has happened on MBP 13" retina and APPLE fixed it by updating the software. I wish Apple will also do something for the old MBP to fix the intermal keyboard and trackpad problem.

    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".

  • Windows error: iTunes crashes (uninstall and reinstall does not work)

    Hello all.
    I (and another user) have had a problem with iTunes crashing when trying to open it. Windows just generates the typical vague error message that explains nothing as to what the problem is. Uninstalling and reinstalling did not work, and using the "Repair" option did not work either.
    This was the solution. Hope it works for you. Cheers.
    C ;o)
    Here are the steps, some might be redundant, but still follow them to try and get iTunes to work.
    1. *Extremely important* Close the QuickTime launcher in the tray on the right side of your Windows TaskBar (right-click on the blue QuickTime "Q" logo next to where you have the time and date and select "exit".) The QuickTime logo should disappear from the tray.
    2. Go to where your iTunes library folder is, copy it and put it elsewhere on yoour hard-drive. This is where you asked your iTunes to point to and keeps the full repository of the files sync'ed to your iPod. If you don't do this, you will have to re-create the full library of all the music and files you have put into iTunes.
    3. Unistall iTunes and reboot your PC.
    4. Go to c:\Program Files\Quicktime and delete this whole folder.
    5. Go to c:\Windows\System 32 and: delete the Quicktime FOLDER there; then (ii) scroll down and delete all other QuickTime related files (there should be 5-10 of them, I didn't count, some will have a name like QuickTMvr whatever).
    6. Empty Recycle Bin.
    7. Reboot your PC.
    8. Go back to Apple Website and download: iTunes, and (ii) QuickTime installation only (without iTunes).
    9. Install QuickTime FIRST (use newly downloaded version)! Check it works OK by opening it.
    10. Close QuickTime lanucher from tray, as explained above in step 1.
    11. Install iTunes (use the newly downloaded version).
    12. Open iTunes. If it opens fine (clap your hands and say "hurray", and actually I said out loud to my PC, "Please work" and it did - I don't know if this step helped at all. ;o) ), then close iTunes FIRST BEFORE DOING THE NEXT STEP. Go to where the new iTunes (and library) folder is, rename the new iTunes folder (as you might notice when/if you open iTunes, that it is all blank), and copy the old iTunes folder (from step 2) to the same location. Re-open iTunes. It should be the way it opened the last time.

    Btw.
    Don't forget that, from my experience, most iTunes errors comes from malfunctioning instances of QuickTime.

  • I am using chat-r wireless and facetime is not working but when i put rogers fido or any other carrier sim in it work. Anyone know what the problem?

    I am using chat-r wireless and facetime is not working but when i put rogers fido or any other carrier sim in it work. Anyone know what the problem?

    I'm guessing it's a compatibility problem similar to that that T-Mobile in the US has. I'm not familiar with chat-r wireless, but I'm guessing it's not a supported carrier for the iPhone. If they can't tell you how to fix it, I'm guessing it's just plain not going to work.

  • I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time and it does not work in iChat. Why Not ?

    Question:-
    I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time or other portal and it does not work in iChat. Why Not ?
    Answer:-
    For a Name to work in iChat it has to be an Valid AIM screen Name.
    Only Apple IDs from the @mac.com ending names registered here  and the Mobileme (@Me.com ending) names are Valid with the AIM service as well as being Apple IDs
    (I am still working on info about registering with iCloud at the moment but if this does give you an @Me.com email it may well be a valid AIM name as well)
    NOTES:-
    The @mac.com page works by linking an external (Non Apple) email with a @mac.com name.
    This External Email cannot be one linked to an Existing Apple ID (you have to use a second email or register at AIM )
    The options at AIM are to use your existing email or create new name and link the existing only for Password recovery
    MobileMe (@me.com ending names) were valid Emails addresses, Apple IDs AND a Valid AIM Screen Name
    @mac.com names look like emails but are only Apple IDs and iChat/AIM Valid Screen Names.
    The AIM registration page seems to be pushing you to register [email protected] This is relatively new and I have not followed through the pages to find out if it a valid AIM email (Previously you could register a name without an @whatever.com suffix)
    8:16 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

    Question:-
    So I have my current [email protected] email in iChat as I thought as I had linked that to an Apple ID it was a Valid iChat Name.  It keeps coming up with a UserName or Password Invalid message.  What do I do next ?
    Answer:-
    Open iChat
    Go to the Menu under the iChat name in the Menu Bar and then Preferences and then Accounts in the new window.
    Commonly written as iChat > Preferences > Accounts as directions/actions to take.
    If it displays with a Yellow running name in the list you have a choice.
    Either register it at AIM (I would use a different password to the ISP Login) and then change the password only in iChat  (It may take you to confirm any Confirmation email from AIM first) in iChat > Preferences > Accounts
    Or you register a new Name at AIM (Or at @mac.com) and enter that (details below)
    If you have a Blue Globe name  (@mac.com) that will not Login the chances are that it the password that is the issue.
    Apple lets you create longer passwords than can be used with the AIM Servers.
    Change the Password at iForgot to no more than 16 characters.
    Then change the password in iChat as details above.
    Adding a new Account/Screen Name in iChat (that is valid with the AIM servers)
    Open iChat if not launched.
    Go to iChat Menu > Preferences > Accounts
    Click the Add ( + )  Button at the bottom of the list.
    Choose in the top item drop down either @Mac.com or AIM depending on what you registered
    Add the name (with @mac.com the software will add the @mac.com bit)
    Add in the password.  (If you don't add it now iChat will ask you each time you open it)
    Click Done.
    The Buddy List should open (New Window)
    The Accounts part of the Preferences should now have the new name and you should be looking at the details.
    You can add something in the Description line which will then title the Buddy List (Useful when you have two or more names) and make it show up as that in the iChat Menu > Accounts and the Window Menu of iChat when logged in.
    You can then highlight any other Account/Screen Name you don't want to use and use the Minus ( - ) Button to delete it.
    8:39 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Not able to sign into Blackberry Protect. Backup and Restore function not working. "Your device isn't associated with a Blackberry ID"

    Not able to sign into Blackberry Protect.  Backup and Restore function not working. Message is: "Your device isn't associated with a Blackberry ID."  My Blackberry Messenger and Blackberry World is working fine so I am sure its not an ID issue on the phone.  I can sign into Link, Blackberry.com and Protect.  I see my device in Protect but cannot send messages or view it on a map.  Times out with cannot reach device message.  BB Protect on Device has a swirling circle beside the on/of switch.  Cannot turn off.  
    I have deleted Link and re-installed.
    I have reset phone to default(factory) and signed in. 
    OS level is 10.2.1.3062
    BB Link is 1.2.3.56
    Solved!
    Go to Solution.

    I managed to figure this out myself. I had to delete the device from the Blackberry Protect website.  protect.blackberry.com.  I wiped my device again and signed in with my Blackberry ID.  I dont know if the step of wiping was necessary as I did not try my backup with the current configuration on the device following the delete.  Restore is in progress for me!

  • E72 - Ctrl+C and Ctrl+V not working in browser

    yesterday i updated my nokia e72 mobile to latest firmware 31 , after that Ctrl+C and Ctrl+V and Ctrl+A shortcut keys are not working in browser. which have made me feel as bad as typing the same text again and again (usfel in blogging or web messaging).
    ALthough these shortcut keys are working in notes and sms application, but not in browser and Quick office applications (word, ecxel etc).
    Can some one tell , how to fix it. or do i need to wait for next firware update. firmware 31 was released on 31 of march 2010. and today is 26th of May. almost two months have passed, and nokia has not yet released patch for this bug ....
    Nokia, how long i need to wait ?, for this bug fix release.

    (Had to edit because didn't read previous post clearly.)
    I originally thought this was a problem of Quick office 6.2.217 Nokia_S603.2. I think it is a Nokia firmware problem as the previous post had stated.

Maybe you are looking for