富文本编辑器kindeditor配置_html/css_WEB-ITnose
kindeditor
文字
編輯器
配置
<!--富文本编辑器kindeditor配置↓ --><link type="text/css" rel="stylesheet" href="kindeditor/themes/default/default.css" /><link rel="stylesheet" href="kindeditor/plugins/code/prettify.css" /><script type="text/javascript" charset="utf-8" src="kindeditor/kindeditor-min.js"></script><script type="text/javascript" charset="utf-8" src="kindeditor/lang/zh_CN.js"></script><script type="text/javascript" charset="utf-8" src="kindeditor/plugins/code/prettify.js"></script><script type="text/javascript"> KindEditor.ready(function (K) { var editor1 = K.create('#content1', { items: ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','removeformat', 'strikethrough', 'lineheight', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist','insertunorderedlist', '|', 'emoticons', 'link', 'insertfile', 'media', '|', 'image', 'multiimage', 'map', 'baidumap', '|', 'preview', 'fullscreen',], cssPath: 'kindeditor/plugins/code/prettify.css', uploadJson: 'kindeditor/asp.net/upload_json.ashx', fileManagerJson: 'kindeditor/asp.net/file_manager_json.ashx', allowFileManager: true, afterChange : function() { $('.word_count1').html(this.count()); //字数统计包含HTML代码 $('.word_count2').html(this.count('text')); //字数统计包含纯文本、IMG、EMBED,不包含换行符,IMG和EMBED算一个文字 ////////// //限制字数 var limitNum = 40000; //设定限制字数 var pattern = '还可以输入' + limitNum + '字'; $('.word_surplus').html(pattern); //输入显示 if(this.count('text') > limitNum) { pattern = ('字数超过限制,请适当删除部分内容'); //超过字数限制自动截取 var strValue = editor.text(); strValue = strValue.substring(0,limitNum); editor.text(strValue); } else { //计算剩余字数 var result = limitNum - this.count('text'); pattern = '还可以输入' + result + '字'; } $('.word_surplus').html(pattern); //输入显示 //////// } , pasteType: 1, afterCreate: function () { var self = this; K.ctrl(document, 13, function () { self.sync(); K('form[name=form1]')[0].submit(); }); K.ctrl(self.edit.doc, 13, function () { self.sync(); K('form[name=form1]')[0].submit(); }); } }); prettyPrint(); });</script><!--富文本编辑器kindeditor配置↑-->
登入後複製
<dt><span class="red">*</span> 职位描述:</dt> <dd > 您当前输入了 <span class="word_count1">0</span> 个文字。(字数统计包含HTML代码。)<span class="word_surplus"></span> </dd> <dd > <textarea id="content1" name="content1" style="width:700px;height:300px;visibility:hidden;"></textarea> </dd>
登入後複製
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前
By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前
By 尊渡假赌尊渡假赌尊渡假赌
擊敗分裂小說需要多長時間?
3 週前
By DDD
R.E.P.O.保存文件位置:在哪里以及如何保護它?
3 週前
By DDD

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)