Colin,
Inserting your custom buttons
You can find the following code in the examples: addcustombuttons.aspx, addcustombuttons_vb.aspx.
<script runat="server">
void Page_Load(object sender, System.EventArgs e)
{
System.Web.UI.WebControls.Image Image1 = new System.Web.UI.WebControls.Image ();
Image1.ID = "Time"; // This ID will be used in template
Image1.ToolTip = "Insert the current time";
Image1.ImageUrl = "timer.gif";
Image1.CssClass = "button";
Image1.Attributes.Add("onclick","var d = new Date(); Paste_Html1('Editor1',d.toLocaleTimeString())");
Image1.Attributes.Add("type","btn");
Editor1.RegisterCustomButton(Image1);
}
</ script> |
Inserting dropdowns
You can find the following code in the examples: addcustombuttons.aspx, addcustombuttons_vb.aspx.
<script runat="server">
void Page_Load(object sender, System.EventArgs e)
{
DropDownList tempDropDown = new DropDownList();
tempDropDown.Attributes.Add("OnChange","Paste_Html1('Editor1',this[this.selectedIndex].value)");
tempDropDown.Items.Add(new ListItem("Insert Html",""));
tempDropDown.ID = "HTML";// This ID will be used in template
tempDropDown.Items.Add(new ListItem("CuteSoft.net","<img src='/images/logo.gif'>"));
tempDropDown.Items.Add(new ListItem("Asp.Net logo","<img src='/images/aspnet.gif'>"));
tempDropDown.Attributes.Add("style","width:100; margin-left:5;font:8pt Verdana;vertical-align:middle;");
Editor1.RegisterCustomButton(tempDropDown);
}
</ script> |
Saving to a file and opening from a file
You can find the following code in the examples: editHtml.aspx, editHtml_vb.aspx.
<script runat="server">
void Page_Load(object sender, System.EventArgs e)
{
if (IsPostBack)
{
// Save the content of the editor to a static html file
Editor1.SaveFile("document.html");
Literal1.Text = Server.HtmlEncode(Editor1.XHTML);
}
else
{
// Load the file to the editor
Editor1.LoadHtml("document.html");
}
}
</ script> |
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx