Skip to content

Commit

Permalink
[trunk] Merged from branches/3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
luolonghao committed Jun 7, 2010
1 parent 62552db commit beb9f64
Show file tree
Hide file tree
Showing 75 changed files with 19,449 additions and 3,623 deletions.
86 changes: 86 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<project name="KindEditor" default="merge_zh_CN" basedir=".">

<description>
KindEditor build file
</description>

<property name="src" location="src"/>
<property name="dist" location="dist"/>
<property name="version" value="3.5"/>
<property name="charset" value="utf-8"/>
<property name="filename" value="kindeditor"/>

<target name="set_en">
<property name="lang" value="en"/>
</target>

<target name="set_zh_CN">
<property name="lang" value="zh_CN"/>
</target>

<target name="set_prop">
<property name="kedir" value="${dist}/${filename}-${version}-${lang}"/>
<property name="kezip" value="${kedir}.zip"/>
</target>

<target name="merge">
<tstamp>
<format property="thisyear" pattern="yyyy"/>
<format property="ymd" pattern="yyyy-MM-dd"/>
</tstamp>
<concat destfile="${filename}.js"
encoding="${charset}"
outputencoding="${charset}">
<fileset file="${src}/header.js"/>
<fileset file="${src}/core.js"/>
<fileset file="${src}/lang/${lang}.js"/>
<fileset file="${src}/plugin.js"/>
</concat>
<replaceregexp file="${filename}.js"
match="\$\{VERSION\}"
replace="${version} (${ymd})"
encoding="${charset}"
byline="true"
flags="g"
/>
<replaceregexp file="${filename}.js"
match="\$\{THISYEAR\}"
replace="${thisyear}"
encoding="${charset}"
byline="true"
flags="g"
/>
</target>

<target name="copy" depends="merge">
<mkdir dir="${dist}"/>
<delete dir="${kedir}"/>
<delete file="${kezip}"/>
<exec executable="svn">
<arg line="export . ${kedir}"/>
</exec>
</target>

<target name="compile" depends="copy">
<exec executable="java">
<arg line="-jar lib/closure-compiler.jar --js=${kedir}/${filename}.js --js_output_file=${kedir}/${filename}-min.js"/>
</exec>
</target>

<target name="zip" depends="compile">
<copy file="${kedir}/docs/license.txt" todir="${kedir}"/>
<delete dir="${kedir}/test"/>
<delete dir="${kedir}/lib"/>
<delete dir="${kedir}/src"/>
<delete dir="${kedir}/docs"/>
<delete file="${kedir}/build.xml"/>
<zip destfile="${kedir}.zip"
basedir="${kedir}"
/>
</target>

<target name="merge_zh_CN" depends="set_zh_CN,merge"/>
<target name="en" depends="set_en,set_prop,zip"/>
<target name="zh_CN" depends="set_zh_CN,set_prop,zip"/>

</project>
12 changes: 12 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
# KindEditor 变更记录
#
#######################################################################
ver 3.5
* 增加: 增加了表格编辑功能。
* 增加: 引入了多国语言机制。
* 增加: 标题、字体、文字大小、颜色可以反映当前状态。
* 增加: 右键菜单支持图标和分割线。
* 增加: 表情功能增加分页和预览。
* 改善: 改善了文章内容比较多时速度比较慢的问题。
* 改善: 编辑器底部显示向下拖动指示图标。
* BUG: 修改了在IE上选中图片或表格后无法用backspace键删除的问题。
* BUG: 修改了在Firefox上全屏后浏览器一直处于加载状态的问题。
* BUG: 修改了在非IE上DOMContentLoaded事件不起作用的问题。

ver 3.4.4 (2010-06-01)
* BUG: 修改了在IE上焦点自动移动到编辑区域的问题。
* BUG: 修改了在IE上打开类型无法修改成当前窗口的问题。
Expand Down
20 changes: 1 addition & 19 deletions docs/license.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
KindEditor 版权声明

1. 源代码:
KindEditor源代码默认在LGPL开源协议下发布,免费使用KindEditor必须遵守LGPL协议,下面是LGPL协议的概要,详细内容请参考原文。

1) 您可以自由使用、修改、分发源代码,但要符合开源精神。
2) 源代码的版权归KindEditor开发团队所有,无论修改程度如何,您不得拥有对源代码的版权。
3) 如果有人向您要编辑器源代码,您有义务提供修改后的源代码。
4) 最好在您的网站或程序上添加KindEditor官方网站链接。

LGPL协议原文:http://www.kindsoft.net/lgpl_license.html

2. 风格图标:
KindEditor的小图标来自MS office,office图标版权归微软公司所有。

3. 表情图标:
从3.4版本开始,KindEditor的默认表情图片采用了QQ表情,QQ表情图片版权归QQ开发商腾讯公司所有。
QQ表情图片位于plugins/emoticons目录下。

http://www.kindsoft.net/lgpl_license.html
14 changes: 7 additions & 7 deletions docs/thanks.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
1. Oxygen icons
http://www.oxygen-icons.org/

2. CHEditor
http://www.chcode.com/

3. TinyMCE
2. TinyMCE
http://tinymce.moxiecode.com/

4. CKEditor
3. CKEditor
http://ckeditor.com/

5. jQuery
4. jQuery
http://jquery.com/

6. QQ
5. QQ
http://www.qq.com/

6. Google
http://www.google.com/

30 changes: 23 additions & 7 deletions examples/demo-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
form {
margin: 0;
}
textarea {
display: block;
}
</style>
<script charset="utf-8" src="../kindeditor.js"></script>
<script>
Expand All @@ -29,19 +32,32 @@
<body>
<h3>默认模式</h3>
<form name="example" method="post" action="../php/demo.php">
<textarea id="content1" name="content1" style="width:700px;height:200px;visibility:hidden;">
<textarea id="content1" name="content1" style="width:700px;height:300px;visibility:hidden;">
<p>
<img border="0" alt="" align="left" src="http://kindsoft.net/images/logo_180_30.gif" />
<img border="0" alt="" src="http://kindsoft.net/images/logo_180_30.gif" />
</p>
</p>
KindEditor是一套开源的HTML可视化编辑器,主要用于让用户在网站上获得所见即所得编辑效果,兼容IE、Firefox、Chrome、Safari、Opera等主流浏览器。<br />
KindEditor使用JavaScript编写,可以无缝的与Java、.NET、PHP、ASP等程序接合。
KindEditor非常适合在CMS、商城、论坛、博客、Wiki、电子邮件等互联网应用上使用,2006年7月首次发布2.0以来,KindEditor依靠出色的用户体验和领先的技术不断扩大编辑器市场占有率,目前在国内已经成为最受欢迎的编辑器之一。
</p>
<table width="90%">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</textarea>
<div style="margin:10px 0;">
<input type="button" name="button" value="取得内容" onclick="javascript:alert(KE.util.getData('content1'));" />
<input type="button" name="button" value="取得纯文本" onclick="javascript:alert(KE.util.getPureData('content1'));" />
<input type="submit" name="button" value="提交内容" /> (提交快捷键: Ctrl + Enter)
</div>
<br />
<input type="button" name="button" value="取得内容" onclick="javascript:alert(KE.util.getData('content1'));" />
<input type="button" name="button" value="取得纯文本" onclick="javascript:alert(KE.util.getPureData('content1'));" />
<input type="submit" name="button" value="提交内容" /> (提交快捷键: Ctrl + Enter)
</form>
</body>
</html>
56 changes: 23 additions & 33 deletions examples/demo-02.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
<!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>KindEditor</title>
<style type="text/css" rel="stylesheet">
form {
margin: 0;
}
.editor {
margin-top: 5px;
margin-bottom: 5px;
}
</style>
<script type="text/javascript" charset="utf-8" src="./../kindeditor.js"></script>
<script type="text/javascript">
KE.show({
id : 'content2',
resizeMode : 1,
cssPath : './index.css',
items : [
'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link']
});
</script>
</head>
<body>
<h3>简单模式</h3>
<div class="editor">
<textarea id="content2" name="content" style="width:500px;height:200px;visibility:hidden;"></textarea>
</div>
</body>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>KindEditor</title>
<script charset="utf-8" src="../kindeditor.js"></script>
<script>
KE.show({
id : 'content2',
resizeMode : 1,
allowPreviewEmoticons : false,
allowUpload : false,
items : [
'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link']
});
</script>
</head>
<body>
<h3>简单模式</h3>
<textarea id="content2" name="content" style="width:500px;height:200px;visibility:hidden;"></textarea>
</body>
</html>
78 changes: 35 additions & 43 deletions examples/demo-03.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,36 @@
<!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>KindEditor</title>
<style type="text/css" rel="stylesheet">
form {
margin: 0;
}
.editor {
margin-top: 5px;
margin-bottom: 5px;
}
</style>
<script type="text/javascript" charset="utf-8" src="./../kindeditor.js"></script>
<script type="text/javascript">
KE.init({
id : 'content3',
cssPath : './index.css',
afterCreate : function(id) {
KE.util.focus(id);
}
});
function createEditor(id) {
KE.create(id);
}
function removeEditor(id) {
KE.util.setData(id);
KE.remove(id);
KE.$(id).focus();
}
</script>
</head>
<body>
<h3>手动加载编辑器</h3>
<form name="example" method="post">
<div class="editor">
<textarea id="content3" name="content1" style="width:700px;height:300px;"></textarea>
</div>
<input type="button" name="button" value="加载编辑器" onclick="javascript:createEditor('content3');" />
<input type="button" name="button" value="卸载编辑器" onclick="javascript:removeEditor('content3');" />
</form>
</body>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>KindEditor</title>
<style>
textarea {
display: block;
}
</style>
<script charset="utf-8" src="../kindeditor.js"></script>
<script>
KE.init({
id : 'content3',
afterCreate : function(id) {
KE.util.focus(id);
}
});
function createEditor(id) {
KE.create(id);
}
function removeEditor(id) {
KE.util.setData(id);
KE.remove(id);
KE.$(id).focus();
}
</script>
</head>
<body>
<h3>手动加载编辑器</h3>
<textarea id="content3" name="content1" style="width:700px;height:300px;"></textarea>
<br />
<input type="button" name="button" value="加载编辑器" onclick="javascript:createEditor('content3');" />
<input type="button" name="button" value="卸载编辑器" onclick="javascript:removeEditor('content3');" />
</body>
</html>
53 changes: 25 additions & 28 deletions examples/demo-04.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
<!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>KindEditor</title>
<style type="text/css" rel="stylesheet">
form {
margin: 0;
}
.editor {
margin-top: 5px;
margin-bottom: 5px;
}
</style>
<script type="text/javascript" charset="utf-8" src="./../kindeditor.js"></script>
<script type="text/javascript">
KE.show({
id : 'content4',
wyswygMode : false
});
</script>
</head>
<body>
<h3>默认模式为代码模式、没有指定CSS</h3>
<div class="editor">
<textarea id="content4" name="content" style="width:700px;height:300px;visibility:hidden;"></textarea>
</div>
</body>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>KindEditor</title>
<style type="text/css" rel="stylesheet">
form {
margin: 0;
}
textarea {
display: block;
}
</style>
<script charset="utf-8" src="../kindeditor.js"></script>
<script type="text/javascript">
KE.show({
id : 'content4',
wyswygMode : false
});
</script>
</head>
<body>
<h3>默认模式为代码模式、没有指定CSS</h3>
<textarea id="content4" name="content" style="width:700px;height:300px;visibility:hidden;"></textarea>
</body>
</html>
Loading

0 comments on commit beb9f64

Please sign in to comment.