CSS Link stripped from template

Last post 06-21-2007, 4:34 PM by dOlivaw. 5 replies.
Sort Posts: Previous Next
  •  06-21-2007, 1:38 AM 30941

    CSS Link stripped from template

    Greetings,

    We are using "EditorWysiwygModeCss" to populate the CSS Class drop-down and it works great
    Editor1.EditorWysiwygModeCss ="/StyleSheets/General.css";
    one problem - even if we set
    Editor1.EditCompleteDocument = true;
    when we load a template into the editor, the CSS link in the template gets stripped out, so although the user can select a CSS class, and the class is assigned to the HTML element, it doesn't render (show) in the editor.

    If we do
    Editor1.EditCompleteDocument = false;
    and embed the CSS Link inside the <BODY> tag (yuk), then it does work, until we do an 'undo' or some other action, at which point the link is again stripped.

    We think we must be missing something, but can't see what?

    Thanks!

    Greg

  •  06-21-2007, 2:33 PM 30973 in reply to 30941

    Re: CSS Link stripped from template

    Please help:

    ok - so the problem has nothing to do with the template or the CSS link but we still can't make it work:

    We have CuteEditor in an ascx control that is loaded into our main aspx page. In the On_Load event of the ascx control we are doing this:

    Editor1.EditorWysiwygModeCss ="../ourApp/StyleSheets/example.css";

    The example.css file is a copy of the example.css provided in the CuteEditor download.

    The dropdown populates, and when assigned to text, a span of class="example" is created, however the editor does not render the style visually.

    We looked at the example provided. We even removed the CSS link from the example (to match our page) and it still renders  class assignments properly once the post back is done to populate the drop down. So we assume that the Editor is internally populating the style settings when the parse is done. Makes sense.

    So, why then, if the drop down is getting populated in our page's instance of the Editor, would it not render the class style?

    Obviously we are off-base somewhere but we can't see it.

    Can anyone help sort out the dummies at this end ???




  •  06-21-2007, 3:06 PM 30976 in reply to 30973

    Re: CSS Link stripped from template

  •  06-21-2007, 3:12 PM 30977 in reply to 30976

    Re: CSS Link stripped from template

    Hi Adam

    We have 6.0 on evaluation. Not sure of the build number but we downloaded it about a week ago.

    Greg

  •  06-21-2007, 3:44 PM 30979 in reply to 30973

    Re: CSS Link stripped from template

    dOlivaw,
     
    Are you sure the style sheet path is correct?
     
    Please go to this example:
     
     
    This example is same with the default.aspx page included in the download package.
     
    Then click the "readcolor" in the Css Class Dropdown.
     

     
    Can you change the relative path:

    Editor1.EditorWysiwygModeCss ="../ourApp/StyleSheets/example.css";
     
    to Site root relative path?
     
    Editor1.EditorWysiwygModeCss ="/SomeFolder/ourApp/StyleSheets/example.css";
     
     

    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

  •  06-21-2007, 4:34 PM 30982 in reply to 30979

    Re: CSS Link stripped from template

    Thanks Adam,

    We put a copy of the example.css in all involved folders and changed the path to root-relative and it works...

    I assumed that if the .ascx could read the css file to parse it, the path must be correct, but obviously I was wrong.

    Not sure how that happens... if the path works at debug run-time for the parser to read, why it wouldn't like it later... hmm... the aspx is in the parent folder of the ascx so i guess that means that the ascx 'on_load' runs before it is actually part of the aspx page... learn  something new every day.

    Anyway thanks vm for the fresh eyes.
View as RSS news feed in XML