How to display formated html in a TextArea?

Hi,
I'm trying to display some html in a TextArea. But the formatting does not look good.
here is my mxml file
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
     width="100%" height="100%">
          <mx:TextArea id="legend"
               width="100%" height="100%" editable="false" selectable="false" toolTip="map legend" wordWrap="true">
               <mx:htmlText>
                    <![CDATA[
                         <p><img src="images/projects.png" /> projects</p>
                         <p><img src="images/publications.png" /> pubpcations</p>
                         <p><img src="images/persons.png" /> persons</p>
                         <p><img src="images/news.png" /> news</p>
                         <p><img src="images/events.png" /> events</p>
                         <p><img src="images/documents.png" /> documents</p>
                    ]]>
               </mx:htmlText>
          </mx:TextArea>
</mx:Panel>
and here is the result...
Any idea what I am doing wrong?

I had problems like what you are describing. A picture is worth a thousand words, so take a lookee here: http://www.timos.com/timos/green/ct/CounterThink.cfm. When the app displays, press the link button "About CounterThink", then scroll down to the text block with Mike Adams' photo.
My problems were fixed when I eliminated all the spaces in the HTML code. My source code for that block now looks like this:
<p><img src="../../assets/images/green/mike.png" alt="Mike Adams" width="150" height="149" hspace="5" vspace="3" align="left" />The creator of the cartoons, <b>Mike Adams</b> is a consumer health advocate with a mission to teach personal and planetary health to the public He is a prolific writer and has published thousands of articles, interviews, reports and consumer guides, impacting the lives of millions of readers around the world who are experiencing phenomenal health benefits from reading his articles. Adams is an honest, independent journalist and accepts no money or commissions on the third-party products he writes about or the companies he promotes.</p><p></p><p>In 2007, Adams launched EcoLEDs, a manufacturer of mercury-free, energy-efficient LED lighting products that save electricity and help prevent global warming. He's also a successful software entrepreneur, having founded a well known email marketing software company whose technology currently powers the NaturalNews email newsletters.</p><p></p><p>Adams is currently the executive director of the Consumer Wellness Center, a 501(c)3 non-profit, and regularly pursues cycling, nature photography, Capoeira and Pilates. Known as the 'Health Ranger', Adams' personal health statistics and mission statements are located at <a href=http://www.healthranger.org target="_blank"><u>www.HealthRanger.org</u></a>.</p>
Notice there are no indents, no line breaks, not a single space except for those within the text. The code is a little harder to read this way, but that is what worked. Try it, I hope this works for you. Have fun,
Carlos

Similar Messages

  • Can I display formated text on a TextArea

    I am developing a chat applet. I want to display texts from chatters in a TextArea with specific colour and font. But TextArea only contain a method AppendText(String) where displaying plain text is only possible. Please anyone help me to display formatted text in a TextArea(or any relavent component).
    Thank you very much.

    You will probably want to look at JEditorPane instead.

  • How to display Formatted text view in adobe forms

    Hi Folks,
    We have a element formatted text edit/view in webdynpro so it is easy to make the text formates(Bullets, font sizes, etc..) in webdynpro, but the same feature is not available in Adobe forms designer...I don't find any element in the Adobe Library...
    If any body have an idea how to display the formatted text in adobe, please let me know the procedure.
    I have a html tag related data in my Ztable..I want to display this converted string from HTML Tab on adobe, please explain me how to fix this issue.
    Thanks,
    Naresh.

    Hi Juergen,
    I found Your blog and found it  really interesting... though I was not able to use it: I (like Jun Li is asking, I guess) need to use a dynamic text, containing formatting informations (according the xhtml syntax).
    I tried to pass it to the form by an ABAP-dictionary based interface and by means of the context (in a webdynpro page), but both tries failed.
    Some suggestion will be greatly appreciated.
    Thankyou
    Simone

  • Displaying formatted HTML : URGENT

    Hi,
    I have a RFC that gives as output formatted HTML to my webdynpro view and i need to display the same.
    Now the IFrame in Webdynpro takes only static HTML and i cannot pass a string array of HTML's to it.
    Can any one tell me how to make this work.
    The only workaround that i can think of it to point the iFrame to a jsp and display the html inside the jsp.
    Regards,
    Balaji

    Hi Balaji,
    you don't need a JSP, a servlet is sufficient, if the HTML data represents a complete HTML page, not only a fraction. Here's one possible way to achieve this:
    1. Store the HTML data in a file accessable by the servlet.
    2. Construct an URL to the servlet with at least one parameter pointing to the created file.
    3. Set this URL as the IFrame's source property. The IFrame "calls" the servlet.
    4. The servlet transports the data from the file specified in it's parameter list.
    Hope that helps.
    Regards
    Stefan
    PS: The IFrame UI element is no HTML viewer, so it's no surprise that you can't pass HTML data directly to it.

  • How to display Formatted text in adobe form

    In adobe form, I want to display the text which is inputed by formatted text edit in WD ABAP application.
    It is always displayed as plain text like '<p>this is test text.</p>'. I have set the attribute Data Format to XHTML, Field Format to Rich Text for the Text Field in adobe form. But it doesn't work.
    How to display these formatted text?
    Thanks and Best Regards,
    Jun

    Hi Juergen,
    I found Your blog and found it  really interesting... though I was not able to use it: I (like Jun Li is asking, I guess) need to use a dynamic text, containing formatting informations (according the xhtml syntax).
    I tried to pass it to the form by an ABAP-dictionary based interface and by means of the context (in a webdynpro page), but both tries failed.
    Some suggestion will be greatly appreciated.
    Thankyou
    Simone

  • How to display an HTML file in text Area?

    I am trying to display an HTML formated file in  text area component using Action 3.0. The following script does not generates compiler errors, each function seems to be executed yet the file is not displayed. When trying the same code with myCV.txt and myCV_TA.text = (loader1.data) the text file is displayed OK. Flash MX and actionscript 2.0 had handled that differently but with success???
    ( myCV_TA is the text area component)
    Thanks
    var loader1:URLLoader =new URLLoader();
    loader1.addEventListener(Event.COMPLETE,displayText);
    textload("myCV.html");
    function textload(file:String)
    loader1.load(new URLRequest(file));
    trace("in textload");
    function displayText(e:Event)
    myCV_TA.htmlText = (loader1.data);
    trace("in displaytext");

    hmm.. never tried to use an .html file like that in flash, what's inside that file? text with images tables and so on? the htmltext property supports only a few HTML tags, maybe it's not working because an unsupported tag has been detected.

  • How to display an html located in server to client browser?

    Hi,
    i want to display an html file located at the server to a client browser. how can i do it? and i want the user to select the particular file thru an open dialog box. will it be possible?
    regds,
    Abhi...

    in general about files :
    http://forum.java.sun.com/thread.jsp?forum=45&thread=522723&start=0&range=15#2502318
    simple for html: soemdecription

  • How to display static HTML pages in Oracle Forms 6i

    I want to display static HTML page in oracle Forms ? Can any body help please ? Its very urgent. Many thanks in advance.

    Suresh,
    there exist a Java Bean in teh Forms 6i demos that shows a static HTMl example. Note that the HTML that could be shown is somewhat basic, but it will give you an impression how it can work. The demos are at otn.oracle.com/products/forms --> samples --> 6i demos
    Frank

  • How to display a HTML String in a ActiveX WebBrowser ?

    How to direct display a HTML String in a ActiveX WebBrowser without use a URL ?

    I am sure that it would depend on the browser, but with Internet Explorer from Microsoft, I don't think you can. (I may be wrong on this.) What you could do would be to save your string to file and read the file as a url in the browser. I know that this is a step you are trying to avoid, but it will work.
    Hope that this helps,
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • How to display a html report on jsp page---urgent

    i want to display a html report wen a tab is clicked.can any tell me how to do tat.

    Didn't quite get your requirement. What do you mean by an HTML report?

  • How to display the HTML pages in RRC/RQM dashboard using OpenSocial gadget

    Hi,
    I have a requirement as below:
    1. I have couple of HTML pages which are hosted in the sharepoint site and I would like to display the HTML pages
    2. I would like to have an OpenSocial gadget in the RRC/RQM dashboard that will display the HTML pages  which are hosted in my sharepoint site.
    Could you please suggest the best approach to create an OpenSocial gadget in the IBM's RRC/RQM dashboard whcih will display html contents of another URL ?
    Thanks.
    Knowledge is power.

    Hi Manoj,
    As I understand, you would like to display SharePoint page in another platform.
    Since the you are involving third party platform, you might still need to contact their support engineer about how to render other pages.
    From SharePoint side, by default, SharePoint won't let end user to display site page to other platform, you could add "<WebPartPages:AllowFraming runat="server"/>" in master page or single page layout. So that SharePoint ASP.Net
    page could be displayed on other platform.
    Here I'm talking about ASP.Net page, since HTML page in SharePoint cannot be displayed in browser as I tested, it will be downloaded directly. So I'd suggest you use ASP.Net page as workaround.
    https://social.msdn.microsoft.com/Forums/office/en-US/c8755a6b-f33a-43ed-97d9-8f03c336aa1d/how-to-display-sharepoint-url-in-iframe-in-aspnet-page?forum=sharepointdevelopment
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • How to display format mask as hint to user

    Dear all
    how can i display format mask as hint to user in concurrent program parameter run-time window?
    value set type is fnd_date
    i.e
    From Date |________| DD-Mon-YYYY
    thanks
    Roman

    While defining the parameter why don't you define the Parameter prompt something like below:
    From Date (DD-MON-YYYY): |___________|
    You can always populate the Default Type to SQL Statement and Default Value to select to_char (sysdate,'DD-MON-YYYY') from dual. So it will come as follows:
    From Date (DD-MON-YYYY): | _03-NOV-2012_ |
    Cheers,
    ND
    Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered.

  • How to display a html file without tags?

    Hello,
    I am new for Java programming. Now i have to display a html file without all the tags. My code is the fllowing:
    u = new URL("http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&val=55584070");
    BufferedReader in = new BufferedReader(new InputStreamReader(u.openStream()));
    while ((s = in.readLine()) != null) {
    System.out.println(s);
    in.close();
    Unforturnately, the output is the soucecode of the html file and I just want the content.
    Please help me.
    Thanks a lot in advance,
    Danica

    Here's a simple example
    http://forum.java.sun.com/thread.jspa?threadID=293830
    I haven't tested it, but I bet camickr did.

  • How to display the HTML File Titles instead of File Names

    Hello All,
    I want to display the HTML file titles instead of File names in the Search Results. I've tried to give this command in the 'Visible Properties' in the 'SearchResourceRenderer' as:-
    Visible Properties: rnd:displayTitle
    However this is not working for me. If anyone has an idea of what to pass here or any other alternative to display the Titles.
    Regards
    Vaib

    Summary of steps:
    1) Standard Layout Set used: SearchResultLayoutSet
    2) Create a new layout set using ADVANCED COPY
    3) Change properties as you require
    4) Next modify the search OTH file to reflect this newly created Layout Set (under KM > root > etc > oth > search.oth edit xml file property rndLaoutSet from SearchResultLayoutSet to MyCustomSearchResultLayoutSet)
    5) Check in the document to complete the editing process if Edit Locally is used!
    6) Lastly, activate the OTH file by –
    •     Setting Debugging settings via Debugging Settings
    •     Performing a normal search
    •     Clicking Rendering information and then following link OTH Overview click on Reload
    7) Reload above reloads the OTH file and performing search again will yield the desired result
    8) To turn off the Rendering Information link remove the user id from Debugging Settings.
    Cheers
    Ankit

  • How I can I Html in Java textarea?

    Can anybody give a example to put Html text in textarea. I will be very glad if anybody can help me in this regard.

    Use a javax.swing.JTextPane. It has a setPage, but several ways may lead to HTML.
    Set it to read-only. Ensure it uses text/html not text/plain.
    try {
            String url = "http://java.sun.com";
            JEditorPane editorPane = new JEditorPane(url);
            editorPane.setEditable(false);
            JFrame frame = new JFrame();
            frame.getContentPane().add(editorPane, BorderLayout.CENTER);
            frame.setSize(width, height);
            frame.setVisible(true);
        } catch (IOException e) {
        }Add a HyperlinkListener.
    import javax.swing.*;
    import javax.swing.event.*;
    public class LinkFollower implements HyperlinkListener {
      private JEditorPane pane;
      public LinkFollower(JEditorPane pane) {
        this.pane = pane;
      public void hyperlinkUpdate(HyperlinkEvent evt) {
        if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          try {
            pane.setPage(evt.getURL());       
          catch (Exception e) {       

Maybe you are looking for

  • How do I use DVD sharing using ethernet only?

    Hi All I am trying to set up DVD sharing between my Home PC and macbook. My PC is running Windows 7 Pro x64. I want to use the DVD on the pc to run on my mac. The thing is I only have an Ethernet cable and am a complete noob when it comes to this kin

  • Reversing a document posted to multiple vendors

    Hello--I have a bit of a situation, and I was hoping someone could help. I have a payment that was posted incorrectly, and I need to reverse it. I tried using FBRA and reversing the clearning document, but I get the error message "Document 15xxxxxxxx

  • Can't update or uninstall, missing iTunes.msi file

    I was trying to use homesharing, got iTunes messed up so that it wouldn't update. Now I can't update or uninstall...Get the message: "the feature you are trying to use is on a network resource that is unaccessable." Problem seems to be that the iTune

  • Exception -not-null property references a null or transient value

    HI, I am trying to save a relational table and it is throwing the following exception in Hibernate .Pls help me Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.aexp.acqsys.sim.dm.DmPackageC

  • How to debug LAE function modules in ECC

    Hi, I've been trying to debug sequence of FMs called by LAE during asset creation in ECC. The asset is created for every service contract created in SAP CRM and then replicated to ECC system. While debugging the flow from CRM, I could debug upto ECC