Style a tag in htmlText problem

I want to show an anchor as a standard blue underlined text.
I created a style sheet in the mxml with this line:
a:link{color:blue}
and this
a {color:blue}
Nothing. All day I've been trying to make a link blue in Flex
2. Other things in the style sheet work, I changed the
background-color or the Application in the same style tag. Below
the anchor I changed Button to color:white.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Text;
private function styleit(txt:TextArea):void
var style :StyleSheet = new StyleSheet();
var aLink:Object = new Object();
aLink.color = "#0000EE";
aLink.textDecoration="underline";
aLink.fontSize="14px";
style.setStyle("a:link", aLink);
txt.styleSheet=style;
]]>
</mx:Script>
<mx:TextArea width="500" height="500" id="txt1"
creationComplete="styleit(txt1)">
<mx:htmlText>
<![CDATA[
<a target="_blank" href="
http://www.google.com">blue
underlined 14px</a>
]]>
</mx:htmlText>
</mx:TextArea>
</mx:Application>

Similar Messages

  • Problem mapping styles to tags

    How do I prevent creation of the "Story" tag during mapping of styles to tags?
    I need to achieve the following using a script:
    I have two XMElements in the structure view, say Title and Body as follows:
    <Root>
      <Title/>
      <Body/>
    </Root>
    Also, I have two text frames in a document. The first text frame has text with parastyle named "titlestyle".
    And the second text frame has text with parastyle named "bodystyle".
    What I need is when I do mapping of styles to tags (mapStylesToXMLTags) then the text with "titlestyle" should be placed as contents of title tag and the text with "bodystyle" should be placed as contents in body tag.
    The problem is that when I map styles to text a Story tag is created for each text frame and the original Title and Body tags remain as it is, i.e, empty.
    I get:
    <Title></Title>
    <Body></Body>
    <Story><Title>here are the contents</Title></Story>
    <Story><Body>here are the conents</Body></Story>
    NOTE: If you select the text in text frame and then click the tag in structure view, then the contents are placed correctly. This is what I need as follows:
    <Title>here are the contents</Title>
    <Body>here are the contents</Body>
    Regards,
    Vinoth

    Hi,
    Can you provide some text examples from your xml file. This because to identify the concern in the xml coding.
    Regards
    Thiyagu

  • Map Styles to Tags Problem

    For the first time ever I am having problems running the Map Styles to Tags commmand in InDesign CS3. The program takes some time to d the command but then an empty dialog pops up and the tagging has not happened. Any ideas in taking the text step to debug this problem?
    InCopy CS3 on a PowerMac DualG5/Mac OS X 10.5.8. Extra plug-ins include the K4 workflow system, Universal Type Server plug-in, Notes Manager, Overset Manager. I have attempted to do this operation via InCopy on this article and encountered the same problem.

    I finally figured out this problem. The main article (InCopy document) was very, very long. Once I removed all change tracking in InCopy and turned off change tracking (which involved some changes in K4 administration) everything worked perfectly.

  • INDESIGN GLITCH: Creating an XML file from Indesign Layout - Issue "Using more than one line of GREP" & "Map Styles to Tags"

    I currently create XML from InDesign CC by Mapping Style to Tags.
    - The Paragraph Styles are manually apply to text. These styles include multiple lines of GREP to automatically apply character styles.
    - I map some of the paragraph and character styles to prebuilt tags that have the same name "Map Styles to Tags".
    I have found through trouble-shooting that InDesign is unable to "Map Styles to Tags" for more than one line of GREP. I therefore have to chose which line of GREP to automatically tag and which lines to manually tag.
    Please can anyone help, I need to automatically map tags to at least two character styles in one paragraph via GREP.
    Thanks,

    OK. The best I can suggest is running a Find/Change like this:
    Which will actually apply the character style to the italics (and I would do the bold as well just to make certain). Then run the Map Styles to Tags again, using the Apply by Name. Which will tag the italics.
    I don't know why ID can map to the bold and not the italic character style. It either should do them both (as in this instance) or none at all as the character styles are not actually applied by the grep, just the styling from the character styles.
    Mike

  • Map styles to tags v. Map tags to styles

    Hi everyone,
    Indesign CS4 has an option in the tags panel to:
    1) Map styles to tags
    and
    2) Map tags to styles
    Does anyone know what the difference between these two options are?
    Appreciate any help.

    Tags and Styles serve two separate functions.
    A Tag defines data that belongs to a specific element and is enclosed with an opening and closing tag.
    example:  <element>  This copy will be used for a headline  </element>
    A Style defines how that data will appear with specific attributes: font, font size, color, etc.
    So, say I have an Indesign document that has a predefined paragraph style named: Headline (with attributes of Times New Roman Bold, 18 Point) and I import a file that is tagged like my example. I can map the tag "element" to the style "Headline" and the import can automate the process like this:
    This copy will be used for a headline

  • Error messages when using Mapping Styles to tags

    We are using the XML Export from Indesign as part of our translation workflow. This has been fine until today. I am trying to tag an older document and when I use the Mapping Styles to Tags option I get the following error message:
    "Cannot tag the selected text because the text contains part of a hyperlink or cross reference. Change the text selection to include the entire hyperlink or cross-reference"
    I have no text selected, and I have tried tagging each Cross-Reference in the document and then repeating the map styles to tags all with no result. I don't really understand the message. Can anybody help me?
    I'm using InDesign CS6 Verison 8.0.1 on a MacBook Pro OSx 10.6.8
    Thanks
    Steve M

    Do you still have the original version of ID in which the file was made? If so, try the export to interchange from that. It frequently works better than after conversionin a new version. Open the exported file in CS6 and try your mapping again.
    If that still doesn't work, we'll need someone else to step in who has some XML experience.

  • XML Styles to Tags--template?

    Hi,
    First, many thanks to the users that make this site so helpful.
    My question today is this: I have a book full of chapters that will each be exported to XML.  In each chapter, there are styles that I need to "Map to Tags" (which I've done by hand for the first chapter) for the final XML.  Since the styles will be named the same in each chapter, is there a way for me to retain the mappings to the tags for the next chapter so that I do not have to make those mappings again?
    Atomik Xport's add-on product calls the mapping a "ruleset" (.rls).
    I'd like to avoid scripting this if possible, since the styles for this particular project are 100+ (gulp).
    Any ideas?
    -ThisGuy

    ThisGuy-500 wrote:
    Hi,
    First, many thanks to the users that make this site so helpful.
    My question today is this: I have a book full of chapters that will each be exported to XML.  In each chapter, there are styles that I need to "Map to Tags" (which I've done by hand for the first chapter) for the final XML.  Since the styles will be named the same in each chapter, is there a way for me to retain the mappings to the tags for the next chapter so that I do not have to make those mappings again?
    Atomik Xport's add-on product calls the mapping a "ruleset" (.rls).
    I'd like to avoid scripting this if possible, since the styles for this particular project are 100+ (gulp).
    Any ideas?
    -ThisGuy
    Tags can be saved and loaded via the Window > Tags panel menu.
    Although tag mappings don't appear in the Synchronize Options dialog box of the Book panel's menu, it's worth experimenting to see if the style-to-tag mappings are indeed propagated to component files in a book panel. Let us know your results. If it doesn't work, consider filing a feature request at: wish
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Problem with text-indent style , select tag on IE

    Hi Developers,
    i tried text-indent style class for <select> <option> tag .. The following given code is working on Mozilla fire box browser, but it is not working on IE..
    I am trying to build a tree structure in the list box with multiple levels without ' ' and <OPTGROUP> does not support multiple levels.
    Here is the example with multiple levels.
    <html>
    <head>
    <title>Main </title>
    <style>
    .style {color:green;font-weight:bold}
    .style1 {text-indent:45px;color:red;}
    .style2 {text-indent:90px;color:blue;}
    .style3 {text-indent:135px;color:green;}
    </style>
    </head>
    <body>
    <form name="form1">
    <select name="retail" >
    <option selected disabled value="">Tree Structure</option>
    <option value="Father" class="style">Father</option>
    <option class="style1" value="/retail/chandler/">Son 1</option>
    <option class="style2" value="/retail/chandler/">Grand Son 1</option>
    <option class="style2" value="/retail/chandler/">Grand Son 2</option>
    <option class="style3" value="/retail/chandler/">Great Grand Son 1</option>
    <option class="style3" value="/retail/chandler/">Great Grand Son 2</option>
    <option class="style2" value="/retail/chandler/">Grand Son 3</option>
    <option class="style1" value="/retail/chandler/">Son 2</option>
    </select>
    </form>
    </body>
    </html>
    Please help me out by providing a solution to this issue.

    You have bigger problems than you realize.   On this page - the one after the Splash intro page,
    http://www.transgenic-rabbit-models.com/Home.html
    As seen in Firefox with increased text.  See screenshot.
    Notice how your text boxes are colliding into other text boxes?  This happens when web designers paint themselves into a corner with a rigid layout.  Web pages must be flexible for all screen and text sizes.
    You are using APDivs as a primary layout method which is a bad choice.  And here is why.
    http://apptools.com/examples/pagelayout101.php
    Suggested Tutorials -
    From  Tables to CSS Web Design Part 1 -
    http://www.adobe.com/devnet/dreamweaver/articles/table_to_css_pt1.html
    From   Tables to CSS Web Design Part 2 -
    http://www.adobe.com/devnet/dreamweaver/articles/table_to_css_pt2.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • [CS5 JS] Problem in Applying character styles xml tag names

    Hi,
    e.g. 1
    <italic>This is a italic text with <sup>superscript value</sup></italic>
    e.g.2
    <sup>This is a superscript text with <bold>Bold superscript</bold></sup>
    <italic>  mapped to character style "italic" and
    <sup> mapped to character style "sup"
    In my java script I already mapped the xml tags to specific character styles. In some of the cases (see e.g.1 and e.g.2) I need to map it to other character styles.
    In e.g.1 I need to apply a new character styles "italicSup" for the text "superscript value" same way
    In e.g.2 I need to apply a new character styles "BoldSup" for the text "Bold superscript".
    Can any know how to do this?
    Green4ever

    FYI, I am using
    Win Xp-SP2, CS5 7.0.3

  • Headings tags H1 enlargement problem

    When I set my headings tags <H1>, <H2>, <H3> etc I get the problem of Dreamweaver automatically enlarging the text or it changes the original look and creates space around the heading text to I guess show it's importantance.
    But how do I set my headings tags <H1>, <H2>, <H3> etc without having any change at all to the space around the heading text so there is no visual changes at all and the text appear exactly the same but has a heading tag?

    Headings, paragraphs, forms, and other logical HTML tags all assume default browser styles unless you define  your own set of styles using CSS code.  There should be no enlargement "problem" because some people will invariably increase/decrease text size in browser to make page reading easier on their particular display. 
    CSS code:
    /**zero out default browser settings on everything**/
    * {border:0; margin:0; padding:0; line-height:100%}
    /**Text Styles**/
    h1,h2,h3,h4 {
         font-family: Geneva, Arial, Helvetica, sans-serif;
         font-size: 1.5em;
         color: #666;
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • ASDocs - Preventing style and tags removing from HTML

    Hi,
    I am using Flex 4 ASDoc
    When I write in my comments:
    <span class="myClass">whatever</span>
    entire tag including text is removed (myClass is present in style.css)
    When I write:
    <span style="color: #FF0000;">whatever</span>
    style attribute is removed.
    I have a feeling this has something to do with xslts and other setting. Can someone point me to the files where changes can be made so that custom styles and classes are not processed/removed?
    Thank you.

    bump it up.

  • Custom Tag -- Custom Component problems with iframes

    I have a "project" component that originally iterated over a list of models and created/renderered the corresponding (and fairly complex) interactive UI components for those models. On the client-side, the output from these were then organized neatly into "tabs" via CSS ... all on one page. Since these UI Components are so hefty, when any iteraction was done on one of them, the whole page had to re-render and things got just plain slow. To get around this limitation, I decided to have my "project" component no longer create the UI components himself, but instead generate an IFRAME that points to a page that will generate a single component. This way, any iteraction will just cause that single IFRAME to refresh.
    Due to the fact that an IFRAME can only be populated by using the src attribute, I have created a page that contains a JSF View (<faces:view>) and inside is a single custom tag of mine (<mine:displayView>). Let's call this page singleDisplayView.jsf. I create iframes that point to singleDisplayView.jsf with different request params for each (singleDisplayView.jsf?modelName=Foo, singleDisplayView.jsf?modelName=Bar, etc.)
    The displayView tag has one attribute called requestQueryString and I use the tag like so:
    <t:displayView requestQueryString="<%=request.getQueryString()%>" />The displayView tag's class is DisplayViewTag. In DisplayViewTag::setProperties(UIComponent uiComponent) method, I get the model name out of the request map and set this property on the UIComponent.
    The problem is that I'm noticing that as the main page (that contains these frames) loads, setProperties() is only being called twice. After that, the components created by subsequent iframes just seem to be using the modelName from the second frame.
    Is there a syncronization issue I don't understand?
    Any ideas?
    Any help would be much appreciated.
    Thanks in advance,
    Mark

    On a possibly related note, I read this in an article of the JSF application lifecycle:
    In the first phase of the JSF lifecycle -- restore view -- a request comes
    through the FacesServlet controller. The controller examines the request and
    extracts the view ID, which is determined by the name of the JSP page.Could it be that the lifecycle is trying to reuse components from a single view, since all these iframes are pointing to the same page?

  • JSF custom tag body content problem

    Hi, I'm having some problem with a custom tag I built, but the body of the tag content is not rendered correctly.
    I have:<foo:bar>
        <ul>
            <li>blah</li>
            <li>blah</li>
        </ul>
    </foo:bar>
    </pre>But the rendered html source look like this:    <ul>
            <li>blah</li>
            <li>blah</li>
        </ul>
    <!-- beging foo tag -->
    <!-- end foo tag -->The <ul> tags are supposed to be inside of the <!-- begin foo --> & <!-- end foo -->. I've declared in TLD it has JSP content. I've compared to the J2EE tutorial and corejsp book again and again, couldn't figure where I went wrong. So, am I missing something?
    Thanks a lot.

    Use <f:verbatim> around the non-jsf content.
    I.e.<foo:bar>
    <f:verbatim>
        <ul>
            <li>blah</li>
            <li>blah</li>
        </ul>
    </f:verbatim>
    </foo:bar>--
    Sergey : jsfTutorials.net

  • As3 htmlText problem

    I have a dynamic text box for 3 lines of text. I styled part of the text to be bold and part of it to be regular. When i click on the button to display the text it looks right the first time but if i click on it a second time then all of the text shows up bold instead of just the few lines i assigned the bold tag to. Has anyone else had this issue?

    thanks kglad,
    ok I embedded fonts and it's staying the way it should be but still can't figure out paragraph breaks and leading issue. Not even sure if the way i'm doing it is the best /most efficient way of creating this map?
    here is all my code:
    var alabama_btnInfo = "<b>John Smith<br>(555) 123-4567</b><br><font size=10>Northern Alabama</font><p><b>Mary Smith<br>(555) 123-4567</b><br><font size=10>Southern Alabama</font>";
    var arizona_btnInfo= "<b>Your Name<br>(555) 123-4567</b><br><font size=10>Entire State of Arizona</font>"; and
    alabama_btn.addEventListener(MouseEvent.CLICK, showInfo);
    arizona_btn.addEventListener(MouseEvent.CLICK, showInfo);
    function showInfo(evt:MouseEvent):void {
        stateInfo.htmlText = this[evt.currentTarget.name+"Info"];
    and here is what the map looks like now with the spacing issues when i click on alabama-

  • X6 MP3 art tag image quality problem

    I'm willing to accept this could be an issue with my media software transferring the MP3s (MediaMonkey - an otherwise excellent application), so I'm asking this question on their forum too.
    I've recently synced a load of MP3 files from my main PC to my X6 Mass Storage via USB.
    For some reason, most of the albums have had the album art images reduced in size enormously so they look really blurred and ugly.
    Is this a known issue with the X6, or perhaps a problem with my media software?

    its a problem with the images you tagged. They should be at least 400x400 to show the way they do on psycho's picture.
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

Maybe you are looking for