Kindeditor is used in ASP. Kindeditor version 3.3.1.
1. Download the latest version of Kindeditor. Open the download page.
2. Put the Kindeditor in your website directory, random directory, as long as the path set to the right can!
3. Add the TextArea input box to display the location of the editor. If you already have textarea, add an ID to the attribute.
<textarea id= "content_1" name= "Content" style= "width:700px;height:300px;" ></textarea>
4. Add the Kindeditor reference to the appropriate page and add the following code:
<script type= "Text/javascript" charset= "Utf-8" src= "/editor/kindeditor.js" ></script><script type= " Text/javascript ">
Ke.show ({
ID: ' content_1 '//textarea the ID of the input box
});
</script>
Src= ..... This varies depending on where your kindeditor is placed.
how to get textarea text content?
1. In <textarea id= "content_1" name= "Content" style= "width:700px;height:300px;" ></textarea>
After adding the hidden input and button, the code is as follows: <input id= "content_1_1" type= "hidden" runat= "Server" value= ""/>
<asp:button id= "Button1" runat= "Server" text= "save" onclientclick= "Save ();" onclick= "Button1_Click" cssclass= "I_1"/>
Adding event-handling code
1. First is the client code, executed before the server code, the code is as follows:
function Save ()
{
var s = KE.util.getData ("content_1");
s = KE.util.escape (s);
document.getElementById ("Content_1_1"). Value = S;
}
has been taken in the server control, save the time to maintain the value of content_1_1.
2. Server code, code as follows:
protected void Button1_Click (object sender, EventArgs e)
{
Write the server code you want to execute here, because you have already gone to the value.
}
Above, I think has enough detail, do not understand please leave a message! For more information about Kindeditor, go to http://www.kindsoft.net/doc.php.
For picture uploading, please see http://www.kindsoft.net/list.php?bbsid=7.
HTML Editor Kindeditor