织梦kindeditor文本编辑器增加“查找替换”功能效果演示
1、items 里面增加 search 按钮
['source','|','undo','redo','|','preview','print','template','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','strikethrough','lineheight','removeformat','|','image','multiimage','flash','media','insertfile','table','hr','emoticons','baidumap','pagebreak','anchor','link','unlink','|','about','search']
2、增加语言 和 执行函数
3、增加按钮点击后出来小窗口
kindeditor\plugins 文件夹下新建 search 文件夹,里面再建立个search.js
// 自定义插件 查找与替换
KindEditor.plugin('search', function (K) {
var self = this, name = 'search';
self.clickToolbar(name, function () {
menu = self.createMenu({
name: name
});
var wrapperDiv = "
"
查找与替换" +
"
"
"" +
"
menu.div.append(wrapperDiv);
});
});
完成
用以下代码替换原来的分页代码
完成 标签: