Styling within TextArea

I have been doing the lessons in the tutorials that came with
Flex Builder 2, and have fiddled with the BlogReader sample to
create a version of the BlogReader that reads the RSS of my own
blog:
http://jamesedmunds.com/Flex/BlogReader.cfm
My question has to do with styling
within the TextArea below the grid, where individual
postings are displayed. How would I style this, so that, for
instance, the anchors (links to
http:// addresses, in this case) showed in blue
(and even changed on hover)? Is this possible?
Thanks in advance,
James

I can get the textArea to take the styles passed in through a
stylesheet, but not take the <a> styles.
Here is what is in my stylesheet:
A:link {color:#333300;
text-decoration:underline;}
A:active {color:#333300;
text-decoration:underline;}
A:visited {color:#333300;
text-decoration:underline;}
A:hover {color:#c00000;
text-decoration:underline;}
TextArea
{font-family:Georgia;
font-size:14px;
color:#000000;
The text in the textArea displays in 14px Georgia as
indicated, but the <a> tags do not take the propoerties at
all... the only indication that they are links is that the cursor
changes to the pointing finger when hovered over them.
Thanks in advance for any help,
James

Similar Messages

  • Dynamic linking within TextArea component

    how can i include an MC or button inline within the HTML text
    of a TextArea component -- and also have that object link to an AS
    function? i want to have icons within the text of my TextArea that
    open pop-up windows within the Flash application (MC linkage).
    is this possible?
    is asfunction used? if so how?

    Well if you are still interested in using a text component
    instead of a Button the way you would go about this is using
    textWidth. Here's how I've done it before using a text / label
    whatever you want that shows text.
    // => Set our text we got from database
    myText.text = "This is the text I got from the DB";
    // => Validate it so that way we make sure we get right
    numbers
    myText.validateNow();
    // => Find out how wide our text really is.
    var textWidth:Number = myText.textWidth
    // => Reset the width of our text component and add 20 for
    a little buffer
    myText.width = textWidth + 20;
    Now my suggestion is if your going to be dynamically creating
    these on the fly from a database call you throw it into a method /
    class and have that do all the work for you so all you have to do
    is pass the text to it and it resizes itself based on the example
    above.

  • Anchors within textarea

    Hi All,
    I have an view with a Textarea. In this textarea I read an
    external txt-file in the htmlText-format.
    This is a textfile with FAQ. What I want is having the
    questions on top which links to the question and answer below. Is
    that possible in a way?
    Thanks!

    Thnx Greg, i'll use the accordion to achieve an acceptable
    solution.

  • JavaFX 2.2 TextField and TextArea use black text-fill on select.

    Two of my applications--one FXML and the other UI-coded on NetBeans7.1.1--both have a problem when user selects text in either TextArea or TextField when editing. When content word is double-clicked, the selection background becomes dark blue (dodgerblue) but the text remains BLACK. According to JavaFX-CSS reference the default for -fx-highlight-text-fill is WHITE but this doesn't seem to occur, assuming that "highlight" is the correct operation name.
    I tried an explicit CSS statement: .text-medium {-fx-font: 14 serif;
         -fx-highlight-text-fill: white;
         -fx-highlight-fill: lightgreen;
    } even trying to change the selection background. This also had no effect on selected text color or background.
    Interestingly, other "selection" operations for a TableView or ListView cell work as specified.
    I don't know the JavaFX build version. It came imbedded in jdk1.7.0_03 and was updated with "javafx-windows-i586__Vlatest.exe" download on May 2, 2012.
    Please let me know if this is abnormal and, if so, how it can be fixed.

    MORE INFO:
    The applications and testing is now running on up-to-date platforms: jdk 7.2.0_u4, javafx-2_2_0-beta-b10, NetBeans 7.2 Beta, and JavaFxSceneBuilder 1.0 (which is now somewhat integrated into NB7.2).
    The basic problem--highlighted text-fill color for both TextField and TextArea remains BLACK when double-clicked or selected draging cursor. This should be WHITE by default and the black text is almost invisible.
    Another discovery is that the legendary CTL-Z does not work within TextArea or TextField. All of the other edit keys seem to be fine. My applications have a lot of edit functions so not having an "undo" function is disappointing. Maybe there is some API disclaimer as to CTL-Z being unsupported. Anyone know about this?

  • Styling a document as the document is written

    Hi all
    is it possible to style a styleddocument as i write text to the document,
    i know how to style a document that has text already in it, ie find a string then style it, but i want to see if i can have a toString method that provides a formatted styleddocument (something like toStyledString)
    so this is my toString code
    StyledDocument doc;
    JTextPane jTPHolder=new JTextPane();
    doc = jTPHolder.getStyledDocument();
    something here rather than add to a string to say doc.setText(name) then style name, perhaps find name in the doc then style that?
    result=name+"\n";
    result=result+"{"+"\n";
    for (Enumeration e = atrib.keys(); e.hasMoreElements(); )
    String key = (String)e.nextElement();
    result=result+key+":";
    result=result+atrib.get(key)+";"+"\n";
    result=result+"}"+"\n";in the bold is my ideas on possible styling.
    is this something that is possible to do or am i approaching it wrong?

    First off i made a simple object that i will pass my jtextpane to, for it to do my looping and styling within a thread
    import javax.swing.text.*;
    import javax.swing.*;
    import java.awt.*;
    public class CssSyntax implements Runnable
    //this is the jtextpane holder
    private JTextPane jTPHolder;
    //these are my attributes i want to be coloured
    private String[] formatAtribs={"font-size", "color", "background-color","background-image","height","width","border-width","border-top-width","border-left-width","border-right-width","border-bottom-width","border-color","border-top-color","border-left-color","border-right-color","border-bottom-color","padding","padding-top","padding-left","padding-right","padding-bottom","margin","margin-top","margin-left","margin-right","margin-bottom","font-family", "font-weight", "font-style","background-repeat","background-attachment","background-position","text-align","vertical-align","text-transform","overflow","white-space","cursor","display","border-style","border-top-style","border-left-style","border-right-style","border-bottom-style","text-decoration","position","top","left","right","bottom","list-style-type","list-style-position"};
    //i want to colour brackets too sooooo
    private String[] formatBracket={"{","}"};
    //ill be passing in names dynamically
    private String[] formatNames;
        private StyledDocument doc;
        private Thread animator;
        /** Creates a new instance of CssSyntax */
        public CssSyntax(JTextPane t, String[] tag)
            jTPHolder=t;
            formatNames=tag;       
            doc = jTPHolder.getStyledDocument();
    //make my styles for each required colour
            Style style = jTPHolder.addStyle("Tag", null);
            StyleConstants.setForeground(style, Color.blue);
            Color myGreen=new Color(0,128,0);
            style = jTPHolder.addStyle("Bracket", null);
            StyleConstants.setForeground(style, myGreen);
            Color myBrown=new Color(160,0,0);
            style = jTPHolder.addStyle("Atrib", null);
            StyleConstants.setForeground(style, myBrown);
    //this is a standard black to prevent the document from being recoloured
            style = jTPHolder.addStyle("Value", null);
            StyleConstants.setForeground(style, Color.black);
    //my style document loop
        private void styleDoc()
    //colour everything to black to start with to stop any niggling bugs from colouring things blue
         doc.setCharacterAttributes(0, jTPHolder.getText().length(), jTPHolder.getStyle("Value"), true);
    //loop through my atributes and colour them
         for (int i=0;i<formatAtribs.length;i++)
                int pos=0;
                while ((pos = jTPHolder.getText().indexOf(formatAtribs, pos)) >= 0)
    doc.setCharacterAttributes(pos, formatAtribs[i].length(), jTPHolder.getStyle("Atrib"), true);
    pos += formatAtribs[i].length();
    //loop through my brackets and colour them
    for (int i=0;i<formatBracket.length;i++)
    int pos=0;
    while ((pos = jTPHolder.getText().indexOf(formatBracket[i], pos)) >= 0)
    doc.setCharacterAttributes(pos, formatBracket[i].length(), jTPHolder.getStyle("Bracket"), true);
    pos += formatBracket[i].length();
    //loop through my names and colour them
    for(int i=0;i<formatNames.length-1;i++)
    int pos=0;
    while ((pos = jTPHolder.getText().indexOf(formatNames[i], pos)) >= 0)
    doc.setCharacterAttributes(pos, formatNames[i].length(), jTPHolder.getStyle("Tag"), true);
    pos += formatNames[i].length();
    //stop the thread when ive done my colouring, if this is removed then the syntax is constantly checked and coloured, but my logic sucks and the whole thing flashes as i colour everything black at the start, maybe i should double buffer or something, but for now i just stop and colour on a save event
    stop();
    //start my thread so it doesnt hog up my ap
    public void start()
         animator = new Thread(this);
         animator.start();
    //dunno if this is totally right to be honest, i just nicked it from a thread example :)
    public void run()
         while (Thread.currentThread() == animator)
    styleDoc();
    //apparently this has been deprecated but its here anyway
    public void stop()
         animator=null;
    now in my code i just do this
    CssSyntax colMe=new CssSyntax(jTPCode,workSheet.getTags());
    colMe.start();it works for my syntax highlighting and i hope is easy enough for others to grasp a quick and messy way of syntax highlighting.
    To all the super brains out there, id be happy for improvements to my code (as im sure there are many!) i know its far far far from efficent, but im learning along the way :) and i hope it helps others work on syntax highlighting without having to resort to those complicated syntax highlighters that are already out there ;)

  • Style TextArea

    Hello,
    I am trying to change the background color of the textarea using in-line css.
    responseBox = new TextArea();
    responseBox.setStyle("-fx-font: 14px 'Courier New';-fx-background-color: #000000;");The background color should be black, but it remains as defult (white).
    What am i doing wrong?
    How do I change the color of the font within TextArea?
    Gabor

    Hi Darryl,
    It doesn't work for me. I got this error message permanetly on the console on the other hand either using style or not:
    knownConverters does not contain mapping for javafx.geometry.Insets
    INFO: com.sun.javafx.css.StyleableProperty error
    Styleable [email protected]
    (inherits=false, converter=, initial=2, property=-fx-margin) for
    com.sun.javafx.scene.control.skin.TextInputSkin margin:
    Could not infer 'converter'I saw in a previous post that one experienced this and he was told that TextArea is buggy.
    Thanks, Gabor

  • Create a template that works for paperback and epub...

    Hello Framemakers,
    I am in the process of switching from Word to FrameMaker 12.0. I need to typeset a book and all the research I have done suggests FrameMaker is more stable and less, shall we say finicky that Word is.
    I have begun creating a book template. Things are moving well but a few things are still confusing me: Please answer whatever you can. Your feedback is truly appreciated!
    1. Word as a notion of a 'gutter' which is an extra space resulting in uneven margins. Framemaker does not seem to have this concept, so I have
         1. Set the left margin of the left page to 0.6" and
         2. The left margin of the right page to 0.9"
    Is this the right way to do this in FrameMaker?
    Additionally, the first page of a chapter is more complex. It has
         1. A title with a different font and size
         2. An image
         3. One or two quotations
         4. The top left corner of the body is set to 4.0" instead of 0.76" for the remaining pages.
    3. Now a chapter can start on the left or right page. Per question 1 above, these pages have different margins. I am thinking I shoud create a left title page and a right title page and apply these manually whenever a title page falls on the left or right side. Again, is this the right way to do this in FrameMaker?
    4.  Do I create Separate frames for each of the title, the image, the two quotes or do I apply paragraph styling within the body? Word gave me real grief whenever I would export to pdf because it would (a) move the last line of one page to the next wrecking my layout or worse move the image to the next page! I want to make sure that the pdf output matches the layout.
    5. I want the text to flow around the image on the title page. Do I (a) create a graphics frame for the image and a text frame for the text into the master page, and overlay the image frame on top of the text frame? Or do I insert the image into the text frame directly? Which way is best? Note that each chapter has a different image.
    6. Lastly, and most confusedly is the fact that I need to publish to epub, kindle, and paperback. Do I (a) create three different templates for each? Or do I create one template with conditional formatting? Perhaps there is a completely different way to solve this problem?
    Your thoughts and suggestions are eagerly thought and gladly accepted!
    Thanks!

    First, of course, congratulations! and welcome to a more stable world ;-}
    Assorted suggestions …
    different margins for right and left pages sounds like the right approach to creating a gutter for a facing-pages layout
    firstRight and firstLeft would be possible (plus judicious use of the Double-sided/First page side property)
    to place a graphic and other elements on a title-page, I'd stick with paragraph styling; don't forget that you can create a separate style for the anchor of any graphic
    This simple suggestion may not be compatible with your runaround requirements, though; that's something I've never needed to handle.
    for multiple layouts, I'd go for multiple template documents with different page layout definitions and different definitions (f'r instance, larger font, different colour, no numbering …) for each style
    Other forum contributors will be a lot more up-to-date than I am on new-fangled formats such as ePub, so keep an eye open for updates, completions and corrections.
    Have fun!

  • Fonts issue!!!

    Hi everybody,
    This is related to look and feel of BSP application
    I have a question related to fonts. how can i use fonts in CSS which are not present in C:\Windows\Fonts directory?
    Is there a solution for this problem?
    One solution is to use the following tag :
    @font-face {
            font-family: "xyz.ttf";
            src: url("./path")
    Can this @font-face be specified directly in CSS.
    Normally it is part of styling within html :
    <HTML>
      <HEAD>
        <TITLE>Font test</TITLE>
        <STYLE TYPE="text/css"  >
           @font-face
       </STYLE>
    </HEAD>
    </HTML>
    So, instead can we directly specify @font-face tag in CSS rather than within html?
    I tried directly but it is not working.
    Any suggestions
    Regards
    mohit

    look at this sample code:
    <div class = "jive-quote">
    <html->
    <head->
    <style type="text/css">
    h3 {font-family: times}
    p {font-family: courier}
    p.sansserif {font-family: sans-serif}
    </style>
    </head>
    <body->
    <h3->This is header 3</h3->
    <p->This is a paragraph</p->
    <p class="sansserif"->This is a paragraph</p->
    </body->
    </html->
    <div>
    Note: Remove - in <tags>
    Raja T

  • Script for soft kinsoku override in InDesign CS4?

    I have a javascript for the soft kinsoku override for IDCS5.5 but not for ID4. Can someone please post the .jsx? Thanks!

    I've should have been more specific...I've imported text from Word to InDesign CS4. I didn't realize the paragraph style had the Kinsoku: Soft kinsoku attached to it until I'd already formatted much of the 400 page book (there's a plus sign next to my TXT paragraph style because of this). I have character styling within the paragraphs and don't want to option click the style to remove the Kinsoku. Isn't there a java script available that I can run on the whole InDesign CS4 document that will clear this out. I found one online for InDesign CS5 but not for CS4. I do not know how to write scripts. Thanks!

  • Publishing for a particular CMS

    Hi There
    Just new to using Muse but before I dive in and learn all its bells and whistles I want to make sure this software will export / publish to what I can use.
    I work for a company that use their own CMS platform for all our websites. We have a team of developers who make the CMS work  and create plugins etc etc for it also
    The question is how can we become a approved developer for Adobe so we could possibly be able to develop a plug in to publish to our particular CMS (meaning creating a CSS, template/theme and automatically creating our pages and modules within the CMS from Muse)  and creating a widgets library with all our modules also that can be styled within Muse? Is this a possibility?
    Thanks for your time in responding
    Cheers

    This would help you :
    http://adobe-muse.github.io/MuCowDocs/
    Thanks,
    Sanjit

  • [newbie] How to create a home page with no bottom

    Hi, I'm new to Flex and ActionScript. I'm studying a book
    both on Flex and ActionScript and I'm trying to get started with my
    website. I was able to create the skeleton of it, with an
    ApplicationControlBar at the top, a banner component to the right,
    etc
    Now I wanted the central part of my page to be bottomless,
    meaning that I could add content indefinitely and the user could
    scroll the content with the mouse wheel. However, the only way I
    found so far is to use a text area; the problem is that the
    textarea is in the central part of the page, and when the text goes
    beyond the height, scroll bars appear on the textarea, which is
    horrible. I'd like a similar style as
    http://www.facebook.com/home.php
    Can you see that the page is 'scrollable', with the content
    in the centre but the scroll bars only at the side? How could I
    achieve the same format with Flex 3?
    Thanks.

    Hi,
    Did you try setting textarea's verticalScrollPolicy to
    ScrollPolicy.NONE?
    The textfield within textarea should handle mouse wheel
    scroll now without the scrollbars appearing next to the text area.
    If you need to programmatically scroll, just change the
    verticalScrollPosition.

  • Server side spell checker plugin

    Hi,
    Is there a server side spell checker plugin that I can use within the CQ server for checking the spelling of text written within textareas and textboxes on my page?
    Thanks in advance
    Shriram

    Hi Shriram,
        For rte it is available [1]. In case you are looking to validate the user form submission for textareas and textboxes. It is not available.
        Might be you need to develop one using [2].
    [1]   http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.rte.plugins.Spe llCheckerPlugin
    [2]
    http://wiki.apache.org/jackrabbit/SpellChecker
    http://dev.day.com/docs/en/cq/5-4/javadoc/com/day/cq/wcm/foundation/Search.Result.html#get Spellcheck%28%29
    Thanks,
    Sham

  • Assign paragraph-styles to xml-tags correctly. How to?

    Hi,
    I want to assign xml-tags to existing paragraph styles in InDesign CS6 on a Mac 10.6.8. The xml itself is organized like this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <katalog>
    <artikel id="32434">
    <img href="/bilder/32434.tiff" />
    <artikeltextgruppe>
    <artikelmarke>DieselGabana</artikelmarke>
    <artikelheadline>Jeans ist super</artikelheadline>
    <artikeltext>Superjeans knallt rein.</artikeltext><artikelnummer>70238</artikelnummer>
    <artikelmaterial>100% Jeans</artikelmaterial>
    <artikelgroesse>Uni</artikelgroesse>
    <artikelfarbe>Uni</artikelfarbe>
    </artikeltextgruppe>
    </artikel>
    </katalog>
    By selecting the option "Assign formats per name to the tags" (translated from German) I wanted to generate the desired look. But if I start this all I get is the whole textblock of <artikeltextgruppe> assigned to 1 formatstyle. And besides that the whole content of <artikeltextgruppe> looks like one single paragraph without any structure (no linebreaks) The content though is correctly structured because I can highlight the value of e.g. <artikelmarke>separately by doubleclicking this tag in the structure-view.
    a) What can I do to assign the formats correctly AND to have correct linebreaks?
    b) If I drag my node <img href="/bilder/32434.tiff" /> iin the layout I get a message displayed to search again for the correct reference location. And that happens independently on using relative or absolute references (Although I need to use relative ones) What can I do here?
    thanks so much

    First, I would probably do a search and replace to remove the group element using a text editor (the <artikeltextgruppe> and </artikeltextgruppe> elements). They really are not needed.
    Second, I usually create my styles with the same names as the elements themselves. Then, after the XML is imported, I use the "map tags to styles" command from the Structure pane.
    I copied and pasted the single artikel element to create 4 records, added a varition of an image to each element record. Once the paragraph styles were mapped, your XML looked like this in a two column format (to get all 4 records on a page)...
    By default, ID will create a single line to a single line in the XML. So if you desire elements to be on their own line, the XML needs to be formatted that way. If you need different styling within a paragraph, you need to create character styles and alter the elements within an XML group and or paragraph and add the code in the XML accordingly or post process once inside of ID.
    I always need to take the XML I am given and reformat, move elements with the tree, change links to images, remove tabs and or spaces where I do not want them, tag for character styles, etc., to get close to how I want the initial format to be.
    Mike

  • How can i add css styling to all elements within a symbol.

    How can i add css styling to all elements within a symbol.
    For instance.
    If i have a symbol call "data" and within this i have 4 elements called 1,2,3,4 how do i add styling to all these elements without having to re-write code for each element.
    I know i can style a symbol called "data" by :
    sym.$("data").css("font-family", "baumans, sans-serif", "font-size", "15px");
    ...But this does not style the content of the elements 1,2,3 and 4
    If i were using standard CSS and HTML then all div's within a div called "data" would be styled the same.
    help "my friends of the code"

    Hi Justin,
    1) You have a syntax error here: sym.$("data").css("font-family", "baumans, sans-serif", "font-size", "15px");
    sym.$("data").css({ "font-family": "baumans, sans-serif", "font-size": "15px"} ); // correct
    sym.$("data").css( "font", "15px baumans, sans-serif" ); //correct
    2) Then, loading the jQuery file is not required. You can create a class or change tags.
    How to add a class:
    Changing tags:
    You've got 2 demo files (Edge 5.0) here: class or tag.zip - Box

  • How do I format text within a TextArea

    Hello,
    I would like to create a simple text editor that performs
    syntax highlighting. In order to do so, I would need the ability to
    set the style of individual pieces of text within a TextArea. Is
    this possible? Do I need to subclass the TextArea (or perhaps the
    Text control) to do this? Any pointers in the right direction would
    be appreciated. Thanks!

    The issues around formatting text in the Flash Player are
    numerous. There are several experts who have weighed in on this,
    including .
    Axel
    Jensen who has made available a modification of the
    RichTextEditor component. Additionally,
    Jesse Warden has several older
    articles in his blog on this issue. Finally, there is a
    commercially available Flash/Flex text editor developed by Igor
    (last name unknown to me), and found at:
    http://www.flashtexteditor.com/.
    Overall, the issue of accurately formatting text in
    Flash/Flex has been an exercise in frustration, especially when
    trying to implement htmlText and CSS. I am absolutely amazed that
    Adobe's documentation for this very important aspect of web
    development is either unavailable or deeply flawed, and on top of
    that: How is the Acrobat Connect Buzzword application able to do so
    much with text formatting, clearly within a Flex Framework, and yet
    no concrete documentation of the techniques are available

Maybe you are looking for

  • Pixelated square at start up!!!

    I am having trouble with start up. Upon start up, chimes work, apple appears, then it turns to a pixelated square in the center of the screen. I have tried all suggestions. PRram reset, power management reset, squeezing the computer...nothing seems t

  • Start UP problems, blue screen, Imac (intel) 1.83  17"

    I posted this Saturday in a different area. So forgive me if I did this incorrectly. Imac DuoCore 1.83 (originall with 10.4 Tiger) Upgraded to Leopard several months ago without problems. Have the lastest updates. Two days ago the following started:

  • Multiple users identified when only one on the machine - me

    I am experiencing very slow internet communication and when trying to download latest App from Apple the guidance tells me that I need to shut down 'multiple users' when I am the only user shown on our machine.  We did suffer a power cut a few days a

  • IDOC ISSUE full point assigned

    Hi all I m facing problem to upload data through idoc.the scenario is like we receive electric meter reading in flat file format. And to upload that data JAVA code is written which will create an IDOC FILE this authorization is only give to 2-3 perso

  • Language Problem in BEX

    Hi Everyone, I am facing a very peculiar problem. I have installed SAP GUI 7.0. When I open the BEx Analyzer all Icons in the toolbar which are related to BEx are coming in different language. I have installed that 'n' number of times....restart the