Re: Read Editor CSS from a stream

  •  09-01-2009, 4:28 PM

    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 Complete Thread