EditorWysiwygModeCss does not build dropdown when applied at Page_Load

Last post 04-15-2005, 9:53 PM by randal. 3 replies.
Sort Posts: Previous Next
  •  04-13-2005, 3:27 PM 5691

    EditorWysiwygModeCss does not build dropdown when applied at Page_Load

    When I specify the value of EditorWysiwygModeCss in the Server Tag 
            <CE:Editor ... EditorWysiwygModeCss="client.css" .../>
    Everything works as expected.  The classes are listed in the drop-down menu of classes and the text renders correctly in Normal view.

    But when I use server-side code instead (in the Page_Load subroutine), 
            Editor1.EditorWysiwygModeCss = getSiteCss()
    the page renders correctly in the editor, but the classes are not listed in the drop-down menu.  The menu is empty.

    I want to control the classes in the dropdown under software control, so I need to use the second form.  I would rather not write additional code to build up the drop-down menu under program control.

    Is the difference in behavior depending on the context of the css specification a bug you will fix soon?  Do you have another suggestion?
     
    Thanks
  •  04-13-2005, 6:01 PM 5702 in reply to 5691

    Re: EditorWysiwygModeCss does not build dropdown when applied at Page_Load

    Are you sure the function getSiteCss() return the correct result?

    Can you change it from:
     
    Editor1.EditorWysiwygModeCss = getSiteCss()

    to:

    Editor1.EditorWysiwygModeCss = "client.css"

    Keep me posted.

    By the way, please check your PM. I've sent a message to you.

     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-13-2005, 6:25 PM 5704 in reply to 5702

    Re: EditorWysiwygModeCss does not build dropdown when applied at Page_Load

    First: That's a fine question (which I already investigated).
    Second: Yes I'm sure because, as I said, the page renders correctly (on the Mac) showing that the css is in use.
    Third: I tried it your way with a string constant as suggested just to be sure, and I got the same disappointing results.
     
    FYI, I also set the AutoParseClasses to true before setting EditorWysiwygModeCss, just in case the order made a difference.  The AutoParseClasses was already set in the HTML tag.

    Editor1.AutoParseClasses = "True"
    Editor1.EditorWysiwygModeCss = "rjSite.css"

    Thanks for your help.
  •  04-15-2005, 9:53 PM 5786 in reply to 5704

    Re: EditorWysiwygModeCss does not build dropdown when applied at Page_Load

    Stop the presses.  I found a work-around.

    Additional information:  If I specify a value for EditorWysiwygModeCss in the HTML tag, the Class menu is built from it, and if in addition, I specify a different file for EditorWysiwygModeCss in the Page_Load code, that is the style sheet that is used for the display. 
     
    This suggests the idea that the drop-down menu is build before the Page_Load code is executed.  Perhaps the solution for me is to specify EditorWysiwygModeCss in an even that occurs before Page_Load...
     
    IT WORKS.  You might want to either fix this or document it, but my application works as expected if I put the editor setting in the Page_Init handler, which runs before Page_Load.
     
            Sub Page_Init
                Editor1.EditorWysiwygModeCss = "rjSite.css"
            End Sub
View as RSS news feed in XML