1. Download the latest version of Kindeditor.
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.
<textareaID= "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.
get the textual content of textarea:
1. In<textareaID= "Content_1"name= "Content"style= "width:700px;height:300px;"></textarea>
After adding the hidden input and button, the code is as follows:
<inputID= "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:
functionSave ()
{
vars=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 &NBSP; void button1_click ( object sender, EventArgs e)
{
Write the server code you want to execute here, because you have already gone to the value.
}
Use of HTML editor Kindeditor