Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: drop down customization not working
Re: drop down customization not working
07-01-2010, 9:45 PM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: drop down customization not working
Reply
Quote
Hi ahager,
try
<%@ Page Language=
"C#"
%>
<%@ Register Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
TagPrefix=
"CE"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head id=
"Head1"
runat=
"server"
>
<title>Untitled Page</title>
</head>
<script runat=
"server"
>
protected
override
void
OnLoad(EventArgs e)
{
CuteEditor.ToolControl toolctrl = ceContentLegend.ToolControls[
"Codes"
];
if
(toolctrl !=
null
)
{
CuteEditor.RichDropDownList dropdown = (CuteEditor.RichDropDownList)toolctrl.Control;
CuteEditor.RichListItem richitem = dropdown.Items[0];
dropdown.Items.Clear();
dropdown.Items.Add(richitem);
dropdown.Items.Add(
"line 1"
,
"<h1>is line 1</h1>"
);
dropdown.Items.Add(
"line 2"
,
"<h2>is line 1</h2>"
);
dropdown.Items.Add(
"line 3"
,
"<h2>is line 1</h2>"
);
}
base
.OnLoad(e);
}
</script>
<body>
<form id=
"form1"
runat=
"server"
>
<CE:Editor ID=
"ceContentLegend"
runat=
"server"
>
</CE:Editor>
</form>
</body>
</html>
Regards,
ken
View Complete Thread