kindeditor中插入图片

来源:互联网 发布:小学生画图软件ipad 编辑:程序博客网 时间:2024/05/17 21:38

1·首先下载kindeditor包,放在我们的项目目录下

kindeditor包下载

2·目录结构:

3·创建kindeditor实例时:

KindEditor.ready(function(K) {           editor = K.create('#editor',{             width:'150px',             height:'300px',             items:[        'code', 'cut', 'copy', 'paste',        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',        'italic', 'underline', 'lineheight', 'removeformat', '|', 'image', 'multiimage',        'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',        'anchor', 'link', 'unlink'             ],             /* 制定上传方法 */             uploadJson :'${pageContext.request.contextPath}/kindeditor/jsp/upload_json.jsp',             /* 图片管理器的路径 */     fileManagerJson : '${pageContext.request.contextPath}/kindeditor/jsp/file_manager_json.jsp',     allowFileManager : true,           });}

4·点击图片时:

5·图片上传成功



0 0
原创粉丝点击