[问题]如何在KindEditor添加一行按钮 如何在KindEditor添加一行,然后在那行上添加按钮。注意:必须和快捷按钮放一起。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 官方的API好简单的没介绍怎么在现有功能按钮的基础上在添加按钮。 把你的查找的关键词 改为 添加插件http://www.kindsoft.net/docs/plugin.html(个人推荐)http://down.chinaz.com/try/201106/711_1.htm(如果你想改官方js) <!doctype html><html> <head> <meta charset="utf-8" /> <title>Hello</title> <link rel="stylesheet" href="themes/default/default.css" /> <script charset="utf-8" src="kindeditor.js"></script> <script charset="utf-8" src="lang/zh_CN.js"></script> <script> KindEditor.plugin('hello', function(K) { var editor = this, name = 'hello'; // 点击图标时执行 editor.clickToolbar(name, function() { editor.insertHtml('你好'); }); }); KindEditor.lang({ hello : '你好' }); KindEditor.ready(function(K) { K.create('textarea[name="content"]', { items : ['hello', 'source'] }); }); </script> <style> .ke-icon-hello { background-image: url("icon.png"); width: 16px; height: 16px; } </style> </head> <body> <textarea id="editor_ideditor_id" name="content" style="width:700px;height:300px;"></textarea> </body></html> 注意langType,themeType属性我在原来的themes下建立my/my.css看过源码:_loadStyle(options.themesPath + 'default/default.css');_loadStyle(options.themesPath + themeType + '/' + themeType + '.css');所以 var editor; KindEditor.ready(function(K) { editor = K.create('#editor_id', { themeType : 'my' }); });就能使用,我在lang/*.js直接改文字 正在学继承,请问怎样让我自己的自定义对象继承Array对象? js 对象值的操作 【还是没解决】setTimeout的问题 文本框 按钮 下拉列表框 灰化问题 一个js的语法糖 JavaScript里面声明一个变量,使用var关键字与不使用var关键字有什么区别? 大大虾指点~~ 如何给链接文字改颜色 微软的最新安全补丁禁止使用HHCtrl关闭窗口了 百分紧急求助!如何将内嵌在html中的javascript程序转换成其他语言,比如c或delphi JS JS中二维数组的取值问题
没介绍怎么在现有功能按钮的基础上在添加按钮。
http://www.kindsoft.net/docs/plugin.html(个人推荐)
http://down.chinaz.com/try/201106/711_1.htm(如果你想改官方js)
<html>
<head>
<meta charset="utf-8" />
<title>Hello</title>
<link rel="stylesheet" href="themes/default/default.css" />
<script charset="utf-8" src="kindeditor.js"></script>
<script charset="utf-8" src="lang/zh_CN.js"></script>
<script>
KindEditor.plugin('hello', function(K) {
var editor = this, name = 'hello';
// 点击图标时执行
editor.clickToolbar(name, function() {
editor.insertHtml('你好');
});
});
KindEditor.lang({
hello : '你好'
});
KindEditor.ready(function(K) {
K.create('textarea[name="content"]', {
items : ['hello', 'source']
});
});
</script>
<style>
.ke-icon-hello {
background-image: url("icon.png");
width: 16px;
height: 16px;
}
</style>
</head>
<body>
<textarea id="editor_ideditor_id" name="content" style="width:700px;height:300px;"></textarea>
</body>
</html>
我在原来的themes下建立my/my.css
看过源码:
_loadStyle(options.themesPath + 'default/default.css');
_loadStyle(options.themesPath + themeType + '/' + themeType + '.css');
所以
var editor;
KindEditor.ready(function(K) {
editor = K.create('#editor_id', {
themeType : 'my'
});
});
就能使用,我在lang/*.js直接改文字