Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: New dropdown implementation beside "Fontsize" drop down.
Re: New dropdown implementation beside "Fontsize" drop down.
06-18-2009, 5:38 AM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: New dropdown implementation beside "Fontsize" drop down.
Reply
Quote
Hi kiranthatiparthi,
Try this example
<%@ Page Language=
"C#"
%>
<%@ Register TagPrefix=
"CE"
Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
%>
<html>
<head>
<title>test</title>
</head>
<body>
<form id=
"Form1"
runat=
"server"
>
<CE:Editor ID=
"Editor1"
Height=
"200"
runat=
"server"
TemplateItemList=
"Bold,Italic,Underline, insertcustombutonhere"
>
</CE:Editor>
</form>
</body>
</html>
<script runat=
"server"
>
void
Page_Load(
object
sender, System.EventArgs e)
{
CuteEditor.ToolControl tc = Editor1.ToolControls[
"insertcustombutonhere"
];
if
(tc !=
null
)
{
DropDownList postbutton =
new
DropDownList();
postbutton.Attributes[
"onclick"
] =
"selectValue(this)"
;
postbutton.Items.Add(
"1"
);
postbutton.Items.Add(
"2"
);
postbutton.Items.Add(
"3"
);
tc.Control.Controls.Add(postbutton);
}
}
</script>
<script language=
"JavaScript"
type=
"text/javascript"
>
var time = 1;
function selectValue(it)
{
time = time?0:1;
if
(time)
{
alert(it.value);
// execute command like
// var editor1=document.getElementById("<%=Editor1.ClientID%>");
// editor1.ExecCommand("InsertImage");
}
}
</script>
Regards,
ken
View Complete Thread