富文本
Q1:需要導入的一些包和文件(需要的聯(lián)系我,我發(fā)給你)
Q2:html(富文本2.html)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>富文本框操作</title> <link rel="stylesheet" href="js/layui/css/layui.css" media="all" /></head> <body> <h2>富文本編輯器</h2><div>商品詳細:<textarea cols="80" rows="10" id="details" style="width:700px"></textarea><button type="button" id="btnSubmit">提交</button></div><div id="divContent"></div> </body> <!-- 導入layui --> <script src="js/layui/layui.js"></script> <!-- 導入jquery --> <script type="text/javascript" src="js/jquery-1.11.3.js" ></script> <script type="text/javascript" src="RichTextBox/kindeditor-all.js"></script> <script type="text/javascript" src="RichTextBox/lang/zh-CN.js"></script> <script type="text/javascript">var editor;KindEditor.ready(function(K) {editor = K.create('#details',{uploadJson : 'RichTextBox/jsp/upload_json.jsp', //上傳程序fileManagerJson : 'RichTextBox/jsp/file_manager_json.jsp', //文件管理allowFileManager : true //是否允許上傳}); //創(chuàng)建一個富文本編輯器 });$("#btnSubmit").click(function(){$("#divContent").html(editor.html());}); </script> </html>結(jié)果
可以表情
可以圖片
?
?總而言之,富文本編譯器十分實用,功能非常強大
轉(zhuǎn)載于:https://www.cnblogs.com/zywds/p/9364082.html
總結(jié)
- 上一篇: consul运维
- 下一篇: 宜家家居是干嘛的 知名家具和家居用品零售