0 Replies Latest reply on Oct 22, 2009 5:34 PM by released87

    Styling Rich Text Editor >> Text Area

    released87 Level 1

      Hi,

       

      I am trying to style the text area of the Rich Text Editor with Actionscript. I am able to do so with <mx:Script>, using  'text-area-style-name', and setting it to 'rteText', which is a css class with 'background-color' set to whatever color I want the background to be. However, when I go to do it with Actionscript, I am unable to do it.

       

       

      var textEditor:CSSStyleDeclaration= StyleManager.getStyleDeclaration('RichTextEditor'); //Set properties for Rich Text Editor

      textEditor.setStyle(

      'headersColors', [primary_Color, primary_Color]);

      textEditor.setStyle(

      'borderColor', border_Color);

       

       

      textEditor.setStyle('text-area-style-name', 'rteText'); //Assign class name to style text-area

       

       

       

      var rteText:CSSStyleDeclaration= new CSSStyleDeclaration('.rteText'); //Create css class that has been assigned to text-area-style-name

      rteText.setStyle(

      "background-color", primary_Color); //Edit background-color property

       

      I've tried many different combinations without any success. What am I doing wrong?