主题: 4.x如何添加自定义图标? 这样写不对吗?
作者: _jason, 发布日期: 2013-08-30 18:21:00, 浏览数: 2295

代码如下图:


<style type="stylesheet">
			.ke-icon-source  {
				 background-image: url(static/kindeditor/skins/code.gif);
			      background-position: 0px -672px;
			      width: 16px;
			      height: 16px;
			}
		</style>

<link rel="stylesheet" href="${ctx}/static/kindeditor/themes/default/default.css"/>
		<script type="text/javascript" src="${ctx}/static/kindeditor/kindeditor.js"></script>
		<script type="text/javascript" src="${ctx}/static/kindeditor/lang/zh_CN.js"></script>

<script type="text/javascript">
			KindEditor.lang.source = '插入HTML';
			KindEditor.plugin.source = {
				click : function(id) {
					alert("test");
					//KindEditor.insertHtml(id, '<strong>测试内容</strong>');
				}
			};
			
			var editor;
			KindEditor.ready(function(K){
				editor = K.create('textarea[name=editor]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'link', 'unlink', 'emoticons', 'code', 'image', 'source'] 
				});
			});
		</script> 


怎样都显示不出来。官网的demo中所用的版本是3.X

发表新帖 发表回复