Read Editor CSS from a stream

Last post 09-01-2009, 4:28 PM by Karen. 1 replies.
Sort Posts: Previous Next
  •  09-01-2009, 12:26 PM 55252

    Read Editor CSS from a stream

    Hi All.
     
    I am working on a project where all assets for the site including the CSS file are stored in a sql server database.
     
    Is there a way to use a stream to fill the css dropdown in the editor?
     
     
    Thanks
  •  09-01-2009, 4:28 PM 55264 in reply to 55252

    Re: Read Editor CSS from a stream

    Sure you can use your code to populate CSS dropdown. See developer guide http://cutesoft.net/developer+guide/index.html -> DropDown Customization -> CSS class drop down customization
     
    C# Example:
    if (!IsPostBack) { 
    CuteEditor.ToolControl toolctrl=Editor1.ToolControls["CssClass"];
    if(toolctrl!=null) {
    CuteEditor.RichDropDownList dropdown=(CuteEditor.RichDropDownList)toolctrl.Control;
    //the first item is the caption
    CuteEditor.RichListItem richitem=dropdown.Items[0];
    //clear the items from configuration files
    dropdown.Items.Clear();
    //add the caption
    dropdown.Items.Add(richitem);
    //add value only
    dropdown.Items.Add("RedColor");
    //add text and value
    dropdown.Items.Add("Highlight","Highlight");
    //add html and text and value
    dropdown.Items.Add("<span class='BoldGreen'>Bold Green Text</span>","Bold Green Text","BoldGreen");
    }
    }
View as RSS news feed in XML