推荐设备MORE

广饶企业官网建设—苏州网站

广饶企业官网建设—苏州网站

行业新闻

给大伙儿发一个 kindeditor编写器把小表情 改为

日期:2021-04-04
我要分享

下边提交zui 订制的kindeditor.js /uploads/admin/default//875b231fd39f3cfa85e73fb.zip 涉及到改动的编码片断: 检索:ke-plugin-emoticons 迅速精准定位    都是有注解,我也很少讲过有疑惑留言板留言
KindEditor.plugin('emoticons', function(K) {
 var self = this,
 name = 'emoticons',
 path = (self.emoticonsPath || self.pluginsPath + 'emoticons/emoji/'),//这儿是小表情的文件目录
 allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons,
 currentPageNum = 1;
 var emoji = 
[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "];
 self.clickToolbar(name, function() {
 var rows = 20,//每张显示信息是多少行
 cols = 25,//每张显示信息是多少列
 total = 872,//小表情一共总数
 startNum = 0,//原始显示信息第好多个小表情
 cells = rows * cols,//每张显示信息的小表情总数
 pages = Math.ceil(total / cells),//是多少分页查询
 colsHalf = Math.floor(cols / 2),
 wrapperDiv = K(''),
 elements = [],
 menu = self.createMenu({
 name: name,
 beforeRemove: function() {
 removeEvent();
 menu.div.append(wrapperDiv);
 var previewDiv, previewImg;
 if(allowPreview) {
 previewDiv = K('').css('right', 0);
 previewImg = K('');//这儿是原始显示信息的小表情
 wrapperDiv.append(previewDiv);
 previewDiv.append(previewImg);
 function bindCellEvent(cell, j, num) {
 if(previewDiv) {
 cell.mouseover(function() {
 if(j > colsHalf) {
 previewDiv.css('left', 0);
 previewDiv.css('right', '');
 } else {
 previewDiv.css('left', '');
 previewDiv.css('right', 0);
 previewImg.attr('src', path + num + '.png');
 //console.log('这儿是电脑鼠标飘浮小表情显示信息大小表情的地区');
 K(this).addClass('ke-on');
 } else {
 cell.mouseover(function() {
 K(this).addClass('ke-on');
 cell.mouseout(function() {
 K(this).removeClass('ke-on');
 cell.click(function(e) {
 //console.log('这儿是吧小表情插进到编写器里边',emoji[num]);
 self.insertHtml(emoji[num]).hideMenu().focus();
 e.stop();
 function createEmoticonsTable(pageNum, parentDiv) {
 var table = document.createElement('table');
 parentDiv.append(table);
 if(previewDiv) {
 K(table).mouseover(function() {
 previewDiv.show('block');
 K(table).mouseout(function() {
 previewDiv.hide();
 elements.push(K(table));
 table.className = 'ke-table';
 table.cellPadding = 0;
 table.cellSpacing = 0;
 table.border = 0;
 var num = (pageNum - 1) * cells + startNum;
 for(var i = 0; i ')
 .css('background-position', '-' + (24 * num) + 'px 0px')
 .css('background-image', 'url(' + path + 'static.gif)');
 //console.log('这儿是显示信息小表情目录的地区',num);
 cell.append(span);
 elements.push(cell);
 num++;
 return table;
 var table = createEmoticonsTable(currentPageNum, wrapperDiv);
 function removeEvent() {
 K.each(elements, function() {
 this.unbind();
 var pageDiv;
 function bindPageEvent(el, pageNum) {
 el.click(function(e) {
 removeEvent();
 table.parentNode.removeChild(table);
 pageDiv.remove();
 table = createEmoticonsTable(pageNum, wrapperDiv);
 createPageTable(pageNum);
 currentPageNum = pageNum;
 e.stop();
 function createPageTable(currentPageNum) {
 pageDiv = K('');
 wrapperDiv.append(pageDiv);
 for(var pageNum = 1; pageNum 
  


新疆省SEO笑靥的blog共享全新,最合理的新疆省seo营销推广实例教程、seo提升计划方案、seoseo优化,而且出示对各制造行业客户订制要求营销推广、程序制作开发设计,在其中包括的有:后端开发开发设计【PHP,JAVA,C#,.NET】,前端开发开发设计【Html5,JavaScript,css3,vue+react】,android【安卓系统开发设计】,ios【iPhone开发设计】负荷布署,网站安全性检验,程序bug修补等详询::Tel: