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";