前台代码:
KindEditor.ready(function (K) {
var editor1 = K.create('#BOOK_CATELOGUE', {
cssPath: '/kindeditor/plugins/code/prettify.css',
uploadJson: '/kindeditor/asp.net/upload_json.ashx',
fileManagerJson: '/kindeditor/asp.net/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();
});
这两种方法:
<textarea name="BOOK_CATELOGUE" id="BOOK_CATELOGUE" cols="100" rows="8" style="width:700px;height:200px;visibility:hidden;" runat="server"></textarea>和
<%=Html.TextArea("BOOK_CATELOGUE", "", new { @rows = "8", @cols = "100", @style = "width:550px;height:200px;visibility:hidden;" })%>
都试过,图片能插入。但是获取就是为空
这是控制器的代码:
model.BOOK_CATELOGUE = this.Request["BOOK_CATELOGUE"];
这里获取的值是空的。
这是我发的第3个帖了,我就纳闷,没人能回到啊!
asp.net mvc KindEditor
------解决方案--------------------------------------------------------
default.aspx页面
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication1._default" %>
<html>
<head>
<title>
</title>
<script>
KindEditor.ready(function (K) {
var editor1 = K.create('#BOOK_CATELOGUE', {
cssPath: '/kindeditor/plugins/code/prettify.css',
uploadJson: '/kindeditor/asp.net/upload_json.ashx',