开发者社区> 问答> 正文

如何改变kindeditor的图标样式?报错 

希望更改kindeditor样式,但是不知道相关的文件在哪儿,希望大侠们帮忙:
kindeditor默认样式:

希望改成:

以我自己的理解,主要是改变图标的大小,将原来的图标替换掉
删去默认版本中没有用的图标
大家多帮忙啊~不胜感激

展开
收起
kun坤 2020-06-03 09:37:35 805 0
1 条回答
写回答
取消 提交回答
  • @Roddy###### 初始化的时候有这么一堆值。

    配置编辑器的工具栏,其中”/”表示换行,”|”表示分隔符。
    
    数据类型: Array
    默认值:
    [ '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' ] 
    source	 HTML代码
    preview	 预览
    undo	 后退
    redo	 前进
    cut	 剪切
    copy	 复制
    paste	 粘贴
    plainpaste	 粘贴为无格式文本
    wordpaste	 从Word粘贴
    selectall	 全选
    justifyleft	 左对齐
    justifycenter	 居中
    justifyright	 右对齐
    justifyfull	 两端对齐
    insertorderedlist	 编号
    insertunorderedlist	 项目符号
    indent	 增加缩进
    outdent	 减少缩进
    subscript	 下标
    superscript	 上标
    formatblock	 段落
    fontname	 字体
    fontsize	 文字大小
    forecolor	 文字颜色
    hilitecolor	 文字背景
    bold	 粗体
    italic	 斜体
    underline	 下划线
    strikethrough	 删除线
    removeformat	 删除格式
    image	 图片
    flash	 Flash
    media	 视音频
    table	 表格
    hr	 插入横线
    emoticons	 插入表情
    link	 超级链接
    unlink	 取消超级链接
    fullscreen	 全屏显示
    about	 关于
    print	 打印
    code	 插入程序代码
    map	 Google地图
    baidumap	 百度地图
    lineheight	 行距
    clearhtml	 清理HTML代码
    pagebreak	 插入分页符
    quickformat	 一键排版
    insertfile	 插入文件
    template	 插入模板
    anchor	 插入锚点
    editor = K.create('textarea[name="content"]', {

                width : '800px',

                height : '480px',

                items : [    ]

    }

    少写几个就行了。  ######真的很感谢,但是怎么修改图标的样式(换个背景)和大小呢?###### 该图标需要修改theme/default/default.css 默认的样式,根据你想要的效果,需要修改下边几项。

    .ke-icon-image {
    	background-position: 0px -496px;
    	width: 16px;
    	height: 16px;
    }
    .ke-icon-flash {
    	background-position: 0px -512px;
    	width: 16px;
    	height: 16px;
    }
    .ke-icon-media {
    	background-position: 0px -528px;
    	width: 16px;
    	height: 16px;
    }
    作者默认使用的图标来自一张图片上,是截取得来的。

    你可以在css中加入你自己的图标。 ######决定样式不行,该样式表,css里面自己调,用火狐看一下那个样式,那个文件地址,是在不会换样式的话,就换编辑器,第二个好像是百度出的富编辑器。###### 看我刚改的样式


    问题就是初始化Css是个问题。这一点没百度那个做的好,大家怎么做到的? ######大神,你这个是怎么做到的

    2020-06-03 09:37:43
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载