织梦kindeditor文本编辑器增加“查找替换”功能

2022-08-18

织梦kindeditor文本编辑器增加“查找替换”功能效果演示

织梦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);
    });
});

完成

用以下代码替换原来的分页代码   



    {dede:pagelist listitem="index,end,pre,next,pageno" listsize="5"/}跳转到第




完成

非凡技术导航 优秀网址导航免费网站收录 网站地图

本站收录的网站若侵害到您的利益,请联系我们删除处理

Copyright ©2020 Guojiz V 5.5All Rights Reserved.

备案号 )| 452133545|