主题: 4.X插件问题。 |
作者: 酷疯子, 发布日期: 2012-12-11 16:19:39, 浏览数: 2161 |
自定义插件 死活就是不出来~是什么问题?我第一次使用 kindeditor!
编辑器HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>编辑器</title> <script charset="utf-8" src="/editor/kindeditor.js"></script> <script charset="utf-8" src="/editor/lang/zh_CN.js"></script> <style> .ke-icon-ftp { background-image: url('/editor/plugins/ftp/ftpimg.jpg'); background-position: 0px -672px; width: 16px; height: 16px; } </style> </head> <script> KindEditor.lang({ftp:'ftp'}); KindEditor.ready(function(K) { K.create('#editor_id'); K.create('#id', {items : ['ftp']}); }); </script> <body> <textarea id="editor_id" name="content" style="width:700px;height:300px;"> HTML </textarea> </body> </html> KindEditor.plugin('ftp', function(K) { var editor = this, name = 'ftp'; // 点击图标时执行 editor.clickToolbar(name, function() { editor.insertHtml('你好'); }); }); |