EditorWysiwygModeCss property and Themes

  •  07-01-2008, 2:55 AM

    EditorWysiwygModeCss property and Themes

    Hi,
     
    There appears to be a problem with the way the Editor EditorWysiwygModeCss property works when you're using themes to control the appearance of an app.
     
    The Editor resolves the path to the stylesheets specified by this property relative to the page that contains the editor control. That is OK in a straightforward page scenario, but when you have abstracted presentation settings to a skin file in a Theme, so as to be able to switch the appearance of the app quickly, a relative Url is normally resolved relative to the theme directory. That saves you having to edit an app- or site-relative Url in the skin file for each theme that you provide.
     
    For example, I have a CuteEditor skin defined in my Default theme thus (simplified):

    <ce:Editor SkinID="ContentEditor" runat="server" Height="600px" Width="100%" EditorWysiwygModeCss="~/App_Themes/Default/Html.css"></ce:Editor>

    This works, ie. it finds Html.css in the theme directory. However, if I copy this to create a new theme "Custom", I have to remember to edit the skin file to change the path to the stylesheet to ~/App_Themes/Custom/Html.css. It would be much better to be able to simply specify "Html.css" for the EditorWysiwygModeCss property. This is inline with the way other ASP.NET controls work. (For example the ImageUrl property on the Hyperlink control).


    Paul Taylor
    Dotcom Software Solutions
View Complete Thread