日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Kindeditor富文本编辑器使用

發(fā)布時間:2024/4/15 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Kindeditor富文本编辑器使用 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1、效果圖

2、本次使用只對文本內(nèi)容進行編輯,不包含圖片視頻表情包等等

2.1 下載kindeditor前端樣式,全部都需要

2.2 jsp頁面引入js樣式

<script type="text/javascript" src="<%=path %>/static/js/kindeditor-4.1.10/kindeditor.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=path %>/static/js/kindeditor-4.1.10/lang/zh_CN.js" charset="UTF-8"></script>

2.3 kindeditor初始化

//items中是需要的功能,不需要可以進行修改刪除
KindEditor.ready(function(K) {K.create(
'#content', { //uploadJson : '<%=request.getContextPath() %>/kindeditor/jsp/upload_json.jsp', //fileManagerJson : '<%=request.getContextPath() %>/kindeditor/jsp/file_manager_json.jsp', //allowFileManager : true, items : [ 'source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste', 'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 'superscript', '|', 'selectall', '-', 'title', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'removeformat', '|', 'advtable', 'hr', 'link', 'unlink', '|', 'about' ],afterBlur: function(){this.sync();}}); });

//如果都需要可以使用以下代碼
KindEditor.ready(function(K) {
K.create('#content', { uploadJson : '<%=request.getContextPath() %>/kindeditor/jsp/upload_json.jsp', fileManagerJson : '<%=request.getContextPath() %>/kindeditor/jsp/file_manager_json.jsp', allowFileManager : true, afterBlur: function(){this.sync();} //這行代碼是將輸入內(nèi)容賦值于textarea,必須存在}); }); <textarea style="width:100%;height:200px;visibility:hidden;" name="content" id="content" ></textarea>

?

轉(zhuǎn)載于:https://www.cnblogs.com/lsjBlog/p/9442502.html

總結(jié)

以上是生活随笔為你收集整理的Kindeditor富文本编辑器使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。