Getting editor to apply styles to highlighted text based on selected CssClass DropDown item

  •  01-26-2010, 12:35 PM

    Getting editor to apply styles to highlighted text based on selected CssClass DropDown item

    I have spent a couple hours trying to figure this out, searched your documentation, looked through forums but for for the life of me, can't get it to work.
     --------------
    I am able to dynamically populate my CssClass drop down list just fine. The problem is, when I highlight some text in the Editor Window then select a CssClass to apply to it, I can't get the editor window to recognize the styles that are associated with the class and apply them in the editor window.
     
    When I apply a class, it correctly sets the HTML to:  <span class="bigred">please work</span>
     
    But, in the Normal and Preview mode, it is displayed simply as "please work" instead of what it should be: "please work"
     
    If you tell me to set  the "EditorWysiwygModeCss", I might shoot myself in the face because I have tried that 100 times in 100 different ways and nothing even comes close to working. Half of the time when I set EditorWysiwygModeCss, nothing even shows up in the drop down list (I have AutoParseClasses = false). 
     
    I have tried to make this as simple as possible. I created a .css file in the application root with a single class
    .bigred { font-size:18px; font-weight:bold; color:Red; }
    and have tried setting the  EditorWysiwygModeCss to point to this file.
     
     WHAT AM I MISSING??? There must be some trick or maybe it's not possible but on your main default demo you have a highlighted CssClass and it applies a highlight to the selected text so it must be possible. Thanks! -Phil
    Filed under:
View Complete Thread