Add in body
Add in head
<Form id = "form1" method = "post" action = "<% = Url. Action (" AddNews "," News ") %>">
<Textarea id = "body" cols = "100" rows = "8" style = "width: 700px; height: 200px;
Visibility: hidden; "runat =" server "> </textarea>
<Br/>
<Button type = "submit" id = "article-create-button">
Create Article </button>
</Form> Add in head
<Script charset = "UTF-8" src = ".../ToolKit/KindEditor/kindeditor. js" type = "text/javascript"> </script>
<Script type = "text/javascript">
KE. show ({
Id: cpMainContent_body,
AllowUpload: true, // allows image uploading
ImageUploadJson:.../../asp.net/upload_json.ashx,
FileManagerJson:.../../asp.net/file_manager_json.ashx,
AllowFileManager: true,
AfterCreate: function (id ){
KE. event. ctrl (document, 13, function (){
KE. util. setData (id );
Document. forms [form1]. submit ();
});
KE. event. ctrl (KE. g [id]. iframeDoc, 13, function (){
KE. util. setData (id );
Document. forms [form1]. submit ();
});
}
});
</Script>
Textarea is used to save text and hide it. The text box is implemented in KindEdtior javascript and associated with the id of textarea In the parameter id.
This id is associated with me one night and one morning. When the motherboard is used, the id of textarea will change to the id of ContentPlaceHolder + "_" + textarea In the motherboard, causing me to debug for a long time.