Styles from Style sheets not showing

Last post 11-06-2006, 4:19 PM by asiandreads. 6 replies.
Sort Posts: Previous Next
  •  07-19-2006, 7:46 AM 21056

    Styles from Style sheets not showing

    Hi all
     
    I have the editor in a page that is styled using one set of style sheets.  The editor itself is set to use another set.  However, the actual styles don't show when using the editor - it just isn't WYSIWYG.  Am I missing something fundamental here?
     
    Thansk, Johnie
  •  07-19-2006, 12:41 PM 21072 in reply to 21056

    Re: Styles from Style sheets not showing

    Johnie,
     
    Please check this propery:

    Editor.EditorWysiwygModeCss Property

    Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported. Example EditorWysiwygModeCss="example.css,~/portal.css,/default.css"

    Also make sure you set Editor.AutoParseClasses Property to true.
     

    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

  •  07-20-2006, 4:04 AM 21122 in reply to 21072

    Re: Styles from Style sheets not showing

    Hi Adam
     
    Thanks for replying.  I have set the Editor.EditorWysiwygModeCss property, but I did set the AutoParseClasses to false, as I don't want the users to be confused by the large number of irrelevant styles in the stylesheet.  Rather I want them to use just headings etc to keep a consistent style.
     
    Does AutoParseClasses need to be true for the styles to show in the editor panel while editing?
     
    Thanks, Johnie
  •  07-20-2006, 12:01 PM 21133 in reply to 21122

    Re: Styles from Style sheets not showing

    Johnie,
     
    >>Does AutoParseClasses need to be true for the styles to show in the editor panel while editing?
     
    No. If you set AutoParseClasses to true, CuteEditor will parse the CSS classes from EditorWysiwygModeCss and populate all items into CssClass dropdown.
     
    If you set AutoParseClasses to false, CuteEditor will populate css items from dropdown configuration file into CssClass dropdown.
     
     

    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

  •  11-06-2006, 12:07 PM 24079 in reply to 21072

    Re: Styles from Style sheets not showing

    Adam:

    Editor.EditorWysiwygModeCss Property

    Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported. Example EditorWysiwygModeCss="example.css,~/portal.css,/default.css"

    Also make sure you set Editor.AutoParseClasses Property to true.
     
    How come when I do this (set Editor.AutoParseClasses = true), the custom dropdown I added no longer appears?  I have a dropdown called ["styleSheet"] that I added to the dropdown ToolControls.
     
    The Css Class list is populating the classes from my file, but my dropdown is gone!?
     
  •  11-06-2006, 4:02 PM 24087 in reply to 24079

    Re: Styles from Style sheets not showing

    asiandreads,
     
    >>I have a dropdown called ["styleSheet"] that I added to the dropdown ToolControls.
     
    Where does this come from?
     
    Is that a custom button?
     
    If so, can you pos the code?
     
     

    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

  •  11-06-2006, 4:19 PM 24091 in reply to 24087

    Re: Styles from Style sheets not showing

    Adam:
    asiandreads,
     
    >>I have a dropdown called ["styleSheet"] that I added to the dropdown ToolControls.
     
    Where does this come from?
     
    Is that a custom button?
     
    If so, can you pos the code?
    Adam,
     
    here it is.  dropdown creation code is at the top, but included the rest just in case, rather than having to re-post later:
     

    // create Tool Control for stylesheet dropdown

    CuteEditor.RichDropDownList dropdown = new CuteEditor.RichDropDownList(Editor1);

    dropdown.CssClass = "CuteEditorDropDown";

    dropdown.Width = 80;

    dropdown.ToolTip = "Select a Style Sheet for your page.";

    CuteEditor.ToolControl toolctrl = new CuteEditor.ToolControl("styleSheet", dropdown);

    // insert stylesheet dropdown

    if (toolctrl != null)

    {

    Editor1.ToolControls.Insert(34, toolctrl);

    dropdown.Items.Add("No Stylesheet");

    // code to set up data reader here, but not included in my post....


    while
    (reader.Read())

    {

    stylesheetID = reader["style_sheet_id"].ToString();

    stylesheetName = reader["name"].ToString();
     
    CuteEditor.RichListItem richitem = new CuteEditor.RichListItem(stylesheetName, stylesheetID);

    dropdown.Items.Add(richitem);

    // set current selected style sheet

    if (_styleSheet.Equals(stylesheetName))

    {

    //if (stylesheetName.Contains("first style"))

    dropdown.SelectedIndex = styleCount;

    Editor1.EditorWysiwygModeCss = stylesheetPath;

    }

     

    }

    Editor1.AutoParseClasses = true;

    Editor1.EditorWysiwygModeCss = "~/robsdefault.css";

View as RSS news feed in XML