kindeditor使用记录

--------------------------资源

百度下载包  kindeditor-4.1.11-zh-CN 

解压后根据需要选择asp / asp.net / jsp / php 文件夹之一(这里使用asp.net)

lang / plugins / themes 文件夹为必需

kindeditor-all.js为必需

----------------代码

js:

//加载编辑器
var editor = KindEditor.create('textarea[name="BodyContent"]', {
resizeType: 1,
uploadJson: '/Scripts/kindeditor/asp.net/upload_json.ashx',
fileManagerJson: '/Scripts/kindeditor/asp.net/file_manager_json.ashx',
allowFileManager: false,
items: ['source', 'undo', 'redo', 'wordpaste', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'formatblock', 'fontname', 'fontsize', 'forecolor', 'bold', 'italic', 'table', 'link', 'unlink', 'image', 'fullscreen']
});

对应asp.net文件夹下的处理程序(或者可以自定义ashx处理程序,各位大神如有处理水印及管理请共享一份,感激不尽!)

html:

@Html.TextAreaFor(model => model.BodyContent, new { style = "width:675px; height:225px;overflow:auto;" })  (mvc)

或者

<textarea></textarea>

 

--------------------------js配置

 plugins/image/image.js:

更改代码:uploadJson = K.undef(self.uploadJson, self.basePath + 'asp.net/upload_json.ashx')

---------------------ashx配置

 

(这是文件保存的路径,可自定义)

 

asp.net使用中的问题:

upload_json.ashx中JsonMapper的引用找不到

将bin文件下的litjson.dll 引用重新生成程序,如果还是找不到就关闭解决方案重新打开后清理程序生成程序就可以了。

 

转载于:https://www.cnblogs.com/newrohlzy/p/9206658.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值