<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>KindEditor Examples</title>
<style>
.ke-tabs-example li {
padding: 0 5px;
}
.ke-icon-example1 {
background-image: url(../skins/default/default.gif);
background-position: 0px -672px;
width: 16px;
height: 16px;
}
.ke-icon-example2 {
background-image: url(../skins/default/default.gif);
background-position: 0px -672px;
width: 16px;
height: 16px;
}
</style>
<link rel="stylesheet" href="../themes/default/default.css" />
<link rel="stylesheet" href="../themes/simple/simple.css" />
<script charset="utf-8" src="../kindeditor-min.js"></script>
<script charset="utf-8" src="../lang/zh_CN.js"></script>
<script>
// 自定义插件 #1
KindEditor.lang({
example1 : '插入HTML'
});
KindEditor.plugin('example1', function(K) {
var self = this, name = 'example1';
self.clickToolbar(name, function() {
self.insertHtml('<strong>测试内容</strong>');
});
});
// 自定义插件 #2
KindEditor.lang({
example2 : 'CLASS样式'
});
KindEditor.plugin('example2', function(K) {
var self = this, name = 'example2';
function click(value) {
var cmd = self.cmd;
if (value === 'adv_strikethrough') {
cmd.wrap('<span style="background-color:#e53333;text-decoration:line-through;"></span>');
} else {
cmd.wrap('<span class="' + value + '"></span>');
}
cmd.select();
self.hideMenu();
}
self.clickToolbar(name, function() {
var menu = self.createMenu({
name : name,
width : 150
});
menu.addItem({
title : '红底白字',
click : function() {
click('red');
}
});
menu.addItem({
title : '绿底白字',
click : function() {
click('green');
}
});
menu.addItem({
title : '黄底白字',
click : function() {
click('yellow');
}
});
menu.addItem({
title : '自定义删除线',
click : function() {
click('adv_strikethrough');
}
});
});
});
function getParam(url, name) {
return url.match(new RegExp('[?&]' + name + '=([^?&]+)', 'i')) ? unescape(RegExp.$1) : '';
}
KindEditor.ready(function(K) {
var tabTitleList = ['默认模式', '简单模式', '异步加载', '多语言', '只读模式', '回车换行设置', '统计字数', 'HTML过滤', 'URL设置', '自定义风格', '自定义插件'];
var optionMap = {
'content0' : {
cssPath : '../plugins/code/prettify.css',
allowFileManager : true
},
'content1' : {
cssPath : '../plugins/code/prettify.css',
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
items : [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link']
},
'content2' : {
cssPath : '../plugins/code/prettify.css',
basePath : '../'
},
'content3' : {
cssPath : '../plugins/code/prettify.css',
langType : 'en'
},
'content4' : {
cssPath : '../plugins/code/prettify.css',
readonlyMode : true
},
'content5' : {
cssPath : '../plugins/code/prettify.css',
newlineTag : 'br'
},
'content6' : {
cssPath : '../plugins/code/prettify.css',
afterChange : function() {
K('#tab6 .word_count1').html(this.count());
K('#tab6 .word_count2').html(this.count('text'));
}
},
'content7' : {
cssPath : '../plugins/code/prettify.css',
filterMode : true
},
'content8' : {
cssPath : '../plugins/code/prettify.css',
urlType : ''
},
'content9' : {
cssPath : '../plugins/code/prettify.css',
themeType : 'simple'
},
'content10' : {
cssPath : ['../plugins/code/prettify.css', 'index.css'],
items : ['source', 'removeformat', 'example1', 'example2']
}
};
var editor = null;
var tabs = K.tabs({
src : K('#tabs'),
cls : 'ke-tabs-example',
afterSelect : function(i) {
if (editor) {
editor.remove();
editor = null;
}
if (i == 2) {
return;
}
editor = K.create('#tab' + i + ' textarea[name=content]', optionMap['content' + i]);
}
});
K.each(tabTitleList, function(i, title) {
tabs.add({
title : title,
panel : K('#tab' + i)
});
})
var index = parseInt(getParam(location.href, 'tab') || 0, 10);
tabs.select(index);
K('#tab' + index).show();
K('#tab0 input[name=getHtml]').click(function(e) {
alert(editor.html());
});
K('#tab0 input[name=isEmpty]').click(function(e) {
alert(editor.isEmpty());
});
K('#tab0 input[name=getText]').click(function(e) {
alert(editor.text());
});
K('#tab0 input[name=selectedHtml]').click(function(e) {
alert(editor.selectedHtml());
});
K('#tab0 input[name=setHtml]').click(function(e) {
editor.html('<h3>Hello KindEditor</h3>');
});
K('#tab0 input[name=setText]').click(function(e) {
editor.text('<h3>Hello KindEditor</h3>');
});
K('#tab0 input[name=insertHtml]').click(function(e) {
editor.insertHtml('<strong>插入HTML</strong>');
});
K('#tab0 input[name=appendHtml]').click(function(e) {
editor.appendHtml('<strong>添加HTML</strong>');
});
K('#tab0 input[name=clear]').click(function(e) {
editor.html('');
});
K('#tab2 input[name=load]').click(function() {
K.loadScript('../kindeditor.js', function() {
editor = K.create('#tab2 textarea', optionMap.content2);
});
});
K('#tab2 input[name=remove]').click(function() {
if (editor) {
editor.remove();
editor = null;
}
});
K('#tab3 select[name=lang]').change(function() {
if (editor) {
editor.remove();
editor = null;
}
optionMap.content3.langType = this.value;
editor = K.create('#tab3 textarea', optionMap.content3);
});
K('#tab4 input[name=readonly]').click(function() {
editor.readonly();
});
K('#tab4 input[name=cancel]').click(function() {
editor.readonly(false);
});
K('#tab5 select[name=newlineTag]').change(function() {
if (editor) {
editor.remove();
editor = null;
}
optionMap.content5.newlineTag = this.value;
editor = K.create('#tab5 textarea', optionMap.content5);
});
K('#tab8 select[name=urlType]').change(function() {
if (editor) {
editor.remove();
editor = null;
}
optionMap.content8.urlType = this.value;
editor = K.create('#tab8 textarea', optionMap.content8);
});
K('#tab9 select[name=themeType]').change(function() {
if (editor) {
editor.remove();
editor = null;
}
optionMap.content9.themeType = this.value;
editor = K.create('#tab9 textarea', optionMap.content9);
});
});
</script>
</head>
<body>
<div id="tabs"></div>
<!-- 默认模式 -->
<div id="tab0" style="display:none;">
<form>
<textarea name="content" style="width:800px;height:400px;visibility:hidden;">
<p>
引入文件:
</p>
<pre class="prettyprint">
&lt;link rel="stylesheet" href="../themes/default/default.css" /&gt;
&lt;script charset="utf-8" src="../kindeditor.js"&gt;&lt;/script&gt;
&lt;script charset="utf-8" src="../lang/zh_CN.js"&gt;&lt;/script&gt;
</pre>
<p>
JavaScript代码:
</p>
<pre class="prettyprint">
没有合适的资源?快使用搜索试试~ 我知道了~
ASP源码—熊海日记本.zip
共348个文件
gif:165个
asp:53个
js:37个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 32 浏览量
2023-11-03
00:21:38
上传
评论
收藏 3.19MB ZIP 举报
温馨提示
ASP源码—熊海日记本.zip
资源推荐
资源详情
资源评论
收起资源包目录
ASP源码—熊海日记本.zip (348个子文件)
UpLoad_Class.asp 16KB
link.asp 6KB
file_manager_json.asp 6KB
class.asp 6KB
add_pinlun.asp 5KB
add_left.asp 5KB
about_left.asp 5KB
Up_Class.asp 5KB
JSON_2.0.4.asp 5KB
show.asp 4KB
edit.asp 4KB
about.asp 4KB
list.asp 4KB
index.asp 4KB
add.asp 4KB
huifu.asp 3KB
web_set.asp 3KB
upload_json.asp 3KB
edit_link.asp 3KB
aboutedit.asp 3KB
edit_class.asp 2KB
Config.asp 2KB
search.asp 2KB
about.asp 2KB
lefter.asp 2KB
index.asp 2KB
web_dst.asp 2KB
pass.asp 2KB
demo.asp 2KB
top.asp 2KB
login.asp 2KB
tihuan.asp 1KB
web_setpost.asp 1KB
header.asp 1KB
conn.asp 1KB
conn2.asp 1KB
edit_post.asp 1KB
footer.asp 1KB
add_post.asp 1KB
pass_post.asp 904B
about_editpost.asp 856B
logins.asp 843B
about_post.asp 826B
Upload.asp 802B
delete.asp 659B
aboutdelete.asp 611B
Nohtml.asp 573B
delete_pinglun.asp 568B
delete_all.asp 562B
delete_link.asp 494B
delete_class.asp 473B
checklogin.asp 156B
close.asp 42B
style.css 199KB
bootstrap.min.css 114KB
style.css 21KB
default.css 21KB
qq.css 3KB
simple.css 2KB
invalid.css 2KB
reset.css 1KB
prettify.css 973B
index.css 282B
Aws.exe 635KB
static.gif 35KB
bg-sidebar.gif 32KB
bg-body.gif 21KB
bg-radial-gradient.gif 17KB
35.gif 13KB
42.gif 13KB
bg-login.gif 13KB
40.gif 10KB
18.gif 8KB
19.gif 8KB
11.gif 8KB
32.gif 7KB
49.gif 6KB
29.gif 6KB
97.gif 5KB
65.gif 5KB
31.gif 5KB
46.gif 5KB
57.gif 5KB
45.gif 5KB
8.gif 5KB
jquery.wysiwyg.gif 4KB
43.gif 4KB
33.gif 4KB
68.gif 4KB
26.gif 4KB
14.gif 4KB
7.gif 4KB
51.gif 4KB
10.gif 4KB
47.gif 4KB
72.gif 4KB
6.gif 3KB
94.gif 3KB
84.gif 3KB
41.gif 3KB
共 348 条
- 1
- 2
- 3
- 4
资源评论
毕业_设计
- 粉丝: 1925
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功