<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" %>

<script runat="server">
    protected void Page_Load(object sender, EventArgs e) {
        //this.Label1.Text =  Request.Form["content1"];
    }

</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head runat="server">
    <title>KindEditor ASP.NET</title>
    <link rel="stylesheet" href="../kindeditor/themes/default/default.css" />
    <link rel="stylesheet" href="../kindeditor/plugins/code/prettify.css" />
    <script charset="utf-8" src="../kindeditor/kindeditor.js"></script>
    <script charset="utf-8" src="../kindeditor/lang/zh_CN.js"></script>
    <script charset="utf-8" src="../kindeditor/plugins/code/prettify.js"></script>
    <script>
        KindEditor.ready(function (K) {
            var editor1 = K.create('#content1,#Textarea1', {
                cssPath: '../kindeditor/plugins/code/prettify.css',
                uploadJson: '../kindeditor/upload_json.ashx',
                fileManagerJson: '../kindeditor/file_manager_json.ashx',
                allowFileManager: true,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                }
            });
            prettyPrint();
        });
    </script>
</head>
<body>
    <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
    <form id="example" runat="server">
    <textarea id="content1" cols="100" rows="8" style="width: 700px; height: 200px; visibility: hidden;"
        runat="server"></textarea>
    <br />
    <textarea id="Textarea1" cols="100" rows="8" style="width: 700px; height: 200px; visibility: hidden;"
        runat="server"></textarea>
    <asp:Button ID="Button1" runat="server" Text="提交内容" />
    (提交快捷键: Ctrl + Enter)
    </form>
</body>
</html>
