2 Replies Latest reply on Mar 14, 2007 3:49 PM by ProfessorC

    Styling a RichTextEditor

    ProfessorC Level 1
      I have a RichTextEditor that I've assigned a style to the textArea. But I don't seem to be able to style anchor links.

      Basically, I want a style like:
      .myRTETextAreaStyle A {
      color:#0000ff;
      text-decoration:underline;
      }

      But it doesn't seem to work. I can style the overall color, but not specific children like A, B or I.

      Is there a way to do this? And why doesn't the RichTextEditor distinguish anchors by default? It's entirely counter-intuitive not to have the link colored or differentiated somehow.

      Thanks in advance.
      -Carl
        • 1. Re: Styling a RichTextEditor
          Proeliata
          I haven't worked with RichTextEditors, so I don't know if this is the only solution to your problem, but when I've wanted to apply styles to, for example, specific DataGrid data cells, I simply did it manually, by defining the style I want in my CSS file and then accessing that data cell and assigning the style to it.
          • 2. Re: Styling a RichTextEditor
            ProfessorC Level 1
            Thanks, Proeliata.

            The RichTextEditor has a textArea child object, which I think is probably akin to individual cells of a DataGrid like you're talking about. I tried assigning the style for both/either the RichTextEditor and/or the RichTextEditor.textArea and neither worked.

            I'm thinking the only way I'd be able to do it is if I could somehow grab the pointer to the anchor itself and apply the style to it... which I don't think is possible.