Summary of how kindeditor is used in Asp.net

Source: Internet
Author: User

The foreign server seems to have locked the Web due to security issues in some DLL editors to be referenced. some permissions in config are not available if freetexbox is tried first, and FCKeditor is not available because DLL files are to be referenced. Finally, my colleague introduced a kindeditor editor for JS only. It will not be used if downloaded, I cannot find a similar method on the Internet and may not have encountered such a problem. After one night's research demo and my colleagues helped me, I finally figured out how to use it. I will summarize it myself, I also hope to help people who need it in the future. here is an example of reading and saving data from a database. For other parameters, see the official website of kindeditor.

1. First copy the following to the path to use the editor.
<Input type = "hidden" name = "content1" id = "content1" value = '<% = databind %>'/>
<Input type = "hidden" name = "content" runat = "server" id = "content"/>
<SCRIPT type = "text/JavaScript" src = "kindeditor. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
Document. getelementbyid ("content"). value = Document. getelementbyid ("content1"). value;
// This statement cannot be directly used as a server control, so the data cannot be read,
VaR editor = new kindeditor ("Editor ");
Editor. hiddenname = "content ";
Editor. editorwidth = "100% ";
Editor. editorheight = "280px ";
Editor. Show ();
Function kindsubmit (){
Editor. Data ();
}

</SCRIPT>

2. Save button

<Asp: button id = "createadmine" runat = "server" Height = "22" text = "save" width = "42" onclientclick = "kindsubmit () "onclick =" createadmine_click "/> // you must submit the message from the client before saving the file.

3. background reading

First define
Public String databind;

.....
If (dr. Read ())

{

Databind = read data;

}

...

4. Saved Value
Name = content. value;

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/sendling/archive/2007/07/08/1683094.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.