updating tinymce to 1.41
This commit is contained in:
parent
dc1721d1ef
commit
bd48711603
125 changed files with 5524 additions and 3444 deletions
|
|
@ -15,7 +15,7 @@
|
|||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
Language packs are simply JavaScript name/value arrays placed in the "<FN Code>.js"
|
||||
Language packs are simply JavaScript name/value arrays placed in the "<<a href="http://www.loc.gov/standards/iso639-2/englangn.html">ISO-639-2 code</a>>.js"
|
||||
files in the "lang" direcotry. Remember to allways use the "lang_"
|
||||
prefix for these value names so that they don't override other variables in the
|
||||
templates. The example below shows how the cut, copy and paste texts are lang packed. Notice there are two kinds of language packs one is the general one shared by all themes these are located in the "jscripts/tiny_mce/langs" directory the other optional one is theme specific language packs these are contained in "jscripts/tiny_mce/themes/<some theme>/langs".<br>
|
||||
|
|
@ -31,12 +31,20 @@ templates. The example below shows how the cut, copy and paste texts are lang pa
|
|||
</table>
|
||||
<p>When translating TinyMCE, these are the files that currently needs to be translated:<br>
|
||||
<br>
|
||||
tinymce/jscripts/tiny_mce/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/emotions/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/iespell/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/preview/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/themes/advanced/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/advhr/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/advimage/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/advlink/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/emotions/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/flash/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/iespell/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/preview/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/print/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/save/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/zoom/langs/en.js<br>
|
||||
tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js<br>
|
||||
<br>
|
||||
Notice some language variables may include a name/url of a gif image or simmilar,
|
||||
for example the button for bold has a "F" character in the Swedish
|
||||
|
|
|
|||
|
|
@ -83,9 +83,7 @@ optional and is not a requierd setting.<br>
|
|||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>[language]</strong></td>
|
||||
<td>Language pack to use with TinyMCE, this should be the FN codes like se,
|
||||
uk, us and so forth and it's used to retrive the language packs located
|
||||
in "langs". This setting defaults to "uk".</td>
|
||||
<td>Language pack to use with TinyMCE, this should be a <a href="http://www.loc.gov/standards/iso639-2/englangn.html">ISO-639-2</a> code and it's used to retrive the language packs located in "langs". This setting defaults to "en".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>[elements]</strong></td>
|
||||
|
|
@ -375,6 +373,22 @@ optional and is not a requierd setting.<br>
|
|||
<td><strong>[cleanup_callback]</strong></td>
|
||||
<td>Custom cleanup callback function, this enabled users to add custom cleanup logic to extend the build in one. This callback is called separatly from the default one, it doesn't replace the old one it just extends it. Check the <a href="themes.htm#cleanup">plugin cleanup</a> function for more details.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>[nowrap]</strong></td>
|
||||
<td>Sets the how content is to be word wrapped. This option is a true/false option and is disabled by default. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>[external_link_list_url]</strong></td>
|
||||
<td>URL to a backend page (PHP,ASP,ASPX,JSP) that is to populate a array with links called tinyMCELinkList check the <a href="../examples/example_link_list.js">example_link_list.js</a> for a example format. This option enables you to better integrate TinyMCE with a backend system. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>[external_image_list_url]</strong></td>
|
||||
<td>URL to a backend page (PHP,ASP,ASPX,JSP) that is to populate a array with links called tinyMCEImageList check the <a href="../examples/example_image_list.js">example_image_list.js</a> for a example format. This option enables you to better integrate TinyMCE with a backend system. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>[file_browser_callback]</strong></td>
|
||||
<td>String containting the callback function to execute on all "browse" buttons. These buttons will apaear when this option is enabled. The callback function format is: fileBrowserCallBack(field_name, url, type). Where field_name is the form field to place browse result in and the url is the url that is to be changed and type is link/image or flash. </td>
|
||||
</tr>
|
||||
<tr bgcolor="#CCCCCC">
|
||||
<td colspan="2"><strong>Advanced theme specific settings </strong></td>
|
||||
</tr>
|
||||
|
|
@ -525,34 +539,6 @@ Mozilla Midas spec.</a> But there are a some tinyMCE specific commands. <br>
|
|||
<td><strong>mceHelp</strong></td>
|
||||
<td>Opens the manual pages.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceInsertTable</strong></td>
|
||||
<td>Inserts a new table at cursor location the default size is 2x2. If the value parameter is specified it should contain a name/value array, this array has the following options cols, rows, border, cellspacing, cellpadding. The default border is set to: 0. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceTableInsertRowBefore</strong></td>
|
||||
<td>Inserts a row before/above the current cursor location. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceTableInsertRowAfter</strong></td>
|
||||
<td>Inserts a row after/under the current cursor location. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceTableDeleteRow</strong></td>
|
||||
<td>Deletes the row at the current cursor location. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceTableInsertColBefore</strong></td>
|
||||
<td>Inserts a column before the current cursor location.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceTableInsertColAfter</strong></td>
|
||||
<td>Inserts a column after the current cursor location.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceTableDeleteCol</strong></td>
|
||||
<td>Deletes the column at the current cursor location. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mceAddControl</strong></td>
|
||||
<td>Adds a editor control to the element id/name specified as value. </td>
|
||||
|
|
|
|||
39
www/extras/tinymce/docs/zh_cn/about.htm
Normal file
39
www/extras/tinymce/docs/zh_cn/about.htm
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>关于TinyMCE</TITLE>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
|
||||
<tr>
|
||||
<td><span class="title">关于 TinyMCE</span></td>
|
||||
<td align="right"><a href="index.htm">内容提要</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<strong>概述</strong><br>
|
||||
TinyMCE是一种适用于MSIE和Mozilla等浏览器的轻量级所见即所得编辑器,以更加友好的方式供用户编辑HTML内容。它小而灵活,为集成而构建,已在Intranets, CMS, LMS之类的系统中有使用先例.<br>
|
||||
<br>
|
||||
TinyMCE由MoxieCode Systems AB开发,根据"LGPL"版权协议发行,请查看版权许可以获取更多细节。<br>
|
||||
<br>
|
||||
<STRONG>特征</STRONG><BR>
|
||||
- 易于集成,只需两行代码.<BR>
|
||||
- 支持模板和自定义主题.<BR>
|
||||
- 便于使用自定义代码扩展.<BR>
|
||||
- 可定制的HTML输出.屏蔽组件,强加属性.<BR>
|
||||
- 国际语言(语言包)支持,目前包括:英国英语,瑞典英语,意大利语,德语,荷兰,当然还有中文.<BR>
|
||||
- 多浏览器支持,目前有:Mozilla, MSIE 及 FireFox.<br>
|
||||
<hr noshade>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
|
||||
<tr>
|
||||
<td>返回 <a href="index.htm">内容提要</a></td>
|
||||
<td align="right"><a href="#">顶部</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</BODY>
|
||||
</HTML>
|
||||
355
www/extras/tinymce/docs/zh_cn/compatiblity.htm
Normal file
355
www/extras/tinymce/docs/zh_cn/compatiblity.htm
Normal file
|
|
@ -0,0 +1,355 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>兼容性图</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<table class="pageheader" border="0" cellpadding="1" cellspacing="3"
|
||||
width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><span class="title">兼容性图</span></td>
|
||||
<td align="right"><a href="index.htm">内容提要</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr noshade="noshade">
|
||||
已经测试过的浏览器及平台设置矩阵:<br>
|
||||
<br>
|
||||
<table cellpadding="4" cellspacing="1" bgcolor="#000000">
|
||||
<tbody>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td style="vertical-align: top;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;">Windows XP<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;">Linux(Debian)<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;">MacOS X 10.3<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;">MacOS 9<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">MSIE 6 </td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"></span><sup></sup><span
|
||||
style="color: rgb(0, 102, 0);">OK</span> </td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">MSIE 5.5 SP2<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">MSIE 5.2<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(255, 128, 0);">TextArea</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">MSIE 5.01 SP2 </td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span> <sup>(1)</sup></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">MSIE 5.0</td>
|
||||
<td style="vertical-align: top;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top;"><span
|
||||
style="color: rgb(255, 128, 0);">TextArea</span></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Netscape 7.2<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Netscape 7.1<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Netscape 7.0.2<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(255, 128, 0);">TextArea</span></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.8<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><br>
|
||||
</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.7.3<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.7.2<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><br>
|
||||
</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.7<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.6<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.5<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span> <sup>(2)</sup></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">OK</span></span>
|
||||
<sup>(2)</sup></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">OK</span></span>
|
||||
<sup>(2)</sup></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.4.1<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.4<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.3.1<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><br>
|
||||
</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">OK</span></span>
|
||||
<sup>(3)</sup></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Mozilla 1.3</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Firefox 1.0<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span> </td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Firefox 0.9<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Firefox 0.8<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);">OK</span></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Firebird 0.7<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">OK</span></span>
|
||||
<sup>(2)</sup></td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(0, 102, 0);"><span style="color: rgb(0, 102, 0);">OK</span></span>
|
||||
<sup>(2)</sup></td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Firebird 0.6<br>
|
||||
</td>
|
||||
<td
|
||||
style="vertical-align: top; text-align: center; color: rgb(153, 0, 0);"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span style="color: rgb(153, 0, 0);">NO</span><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE" style="vertical-align: top;">Safari 1.2.4<br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(255, 204, 0);"></span><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align: center;"><span
|
||||
style="color: rgb(255, 128, 0);">TextArea</span> </td>
|
||||
<td style="vertical-align: top; text-align: center;"><br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<span style="color: rgb(0, 102, 0);">OK</span> : 正常工作<br>
|
||||
<span style="color: rgb(153, 0, 0);">NO</span> : 完全不能工作<br>
|
||||
<span style="color: rgb(255, 128, 0);">TextArea</span> : 非HTML编辑器,仅文本域<br>
|
||||
<span style="color: rgb(255, 128, 0);"><br>
|
||||
</span>注意:<br>
|
||||
(1) : 由于CSS中缺少不透明支持,被禁用按钮将无法变黯淡。<br>
|
||||
(2) : 重新定义表格尺寸仍有部分bug,看起来似乎是浏览器的问题。<br>
|
||||
(3) : 不能重新定义表格尺寸,表格对话框根本不能起作用!<br>
|
||||
<br>
|
||||
<strong>注:测试中只包含了主流的、稳定的并且支持Midas特性的浏览器。并且请记住,如果您的浏览器没有被列举在上方,并不表示TinyMCE在那个浏览器中不能工作,仅仅意味着没有核实过是否能正常工作。</strong><br>
|
||||
<hr noshade="noshade">
|
||||
<table class="pagefooter" border="0" cellpadding="1" cellspacing="3"
|
||||
width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>返回 <a href="index.htm">内容提要</a></td>
|
||||
<td align="right"><a href="#">顶部</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
||||
47
www/extras/tinymce/docs/zh_cn/faq.htm
Normal file
47
www/extras/tinymce/docs/zh_cn/faq.htm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE> 常见问题(FAQ) </TITLE>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
|
||||
<tr>
|
||||
<td><span class="title">常见问题(FAQ)</span></td>
|
||||
<td align="right"><a href="index.htm">内容提要</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<span class="subtitle">为什么"剪切/复制/粘贴"的图标看不到,它们去哪儿了?</span><br>
|
||||
<br>
|
||||
1.20版本中因为在Mozilla和Firefox上的安全性问题,"剪切/复制/粘贴"的图标被移走了。如果一个功能在2/3的目标平台上无法工作,它将不能被包含进来。换句话说,它不是跨平台的。像Ctrl-X/C/V这样的快捷键还是能继续使用,在浏览器的"编辑"菜单中也可以找到这些功能的子菜单。实际上只有图标快捷键被移除了。欲了解这个安全性问题的更详细信息,请点击Mozilla网站上的 <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=192355" target="_blank">bugzilla</a>.<br>
|
||||
<br>
|
||||
<span class="subtitle">为什么MCE在Opera/Konqueror/Safari浏览器上不能正常工作?</span><br>
|
||||
<br>
|
||||
只要这些浏览器不能像Mozilla和MSIE一样支持execCommand及designMode,用JavaScript来创建所见即所得编辑器就是不可能的。但如果这些浏览器开始支持上述特性,我们将尽快使tinyMCE能兼容之。<br>
|
||||
<br>
|
||||
<span class="subtitle">为什么有时候内容是重复的,例如我从word中复制粘贴的时候?</span><br>
|
||||
<br>
|
||||
当HTML内容没有正确格式化的时候就会发生这个错误,这是MSIE的bug。当HTML代码包含"<b/>"或者嵌套的段落标签"<p><p>x</p></p>"的时候就会出错,它产生一个错误的DOM tree,及innerHTML上的错误输出。如果有人知道如何解决这个问题,请告诉我。<span class="subtitle"><br>
|
||||
<br>
|
||||
为什么没有颜色选择跟字体选择?</span><br>
|
||||
<br>
|
||||
因为颜色跟字体选择将破坏站点或系统的布局标准,例如:会太显宽松,所以没有必要在TinyMCE中加上这些。字体跟颜色可以通过CSS类来设置。<br>
|
||||
<br>
|
||||
<span class="subtitle">为什么"撤消/恢复"功能在Mozilla中不起作用?</span><br>
|
||||
<br>
|
||||
这是因为"custom_undo_redo"选项被打开,此选项覆盖了键盘快捷键及命令工具栏上的可用按钮。但目前没有方法可以覆盖内置的"撤消/恢复"菜单子项。<br>
|
||||
<br>
|
||||
<hr noshade>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
|
||||
<tr>
|
||||
<td>返回 <a href="index.htm">内容提要</a></td>
|
||||
<td align="right"><a href="#">顶部</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</BODY>
|
||||
</HTML>
|
||||
39
www/extras/tinymce/docs/zh_cn/index.htm
Normal file
39
www/extras/tinymce/docs/zh_cn/index.htm
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE> 帮助索引 </TITLE>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
.style1 {color: #FF0000}
|
||||
-->
|
||||
</style>
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
|
||||
<tr>
|
||||
<td><span class="title">内容提要</span></td>
|
||||
<td align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
请点击以下链接来查看帮助内容中的不同章节.
|
||||
<ul class="toc_ul">
|
||||
<li class="toc_li"><a href="about.htm">关于TinyMCE</a></li>
|
||||
<li class="toc_li"><a href="using.htm">使用/集成TinyMCE</a></li>
|
||||
<li class="toc_li"><a href="themes.htm">创建主题</a></li>
|
||||
<li class="toc_li"><a href="langs.htm">创建语言包</a></li>
|
||||
<li class="toc_li"><a href="compatiblity.htm">兼容性图</a></li>
|
||||
<li class="toc_li"><a href="faq.htm">常见问题(FAQ)</a></li>
|
||||
<li class="toc_li"><a href="license.htm">版权(LGPL)(英文)</a></li>
|
||||
</ul>
|
||||
<hr noshade>
|
||||
<p>简体中文翻译 by:<a href="http://www.cube316.net/" target="_blank">cube316</a><br>
|
||||
<br>
|
||||
<span class="style1">注意:某些地方由于英文文档说的相当含糊,或者译者本身水平缘故,
|
||||
翻译的不是非常理想,不足之处请多多包涵。<br>
|
||||
不能理解的地方可参阅英文文档,有更好的翻译也请 </span><a href="mailto:cube316@etang.com"><font color="#0000FF">让我知道</font></a><span class="style1"> 。</span></p>
|
||||
</BODY>
|
||||
</HTML>
|
||||
49
www/extras/tinymce/docs/zh_cn/langs.htm
Normal file
49
www/extras/tinymce/docs/zh_cn/langs.htm
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>创建语言包</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
|
||||
<tr>
|
||||
<td><span class="title">创建语言包</span></td>
|
||||
<td align="right"><a href="index.htm">内容提要</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
语言包只是简单的将"lang"目录下"<FN Code>.js"文件中的JavaScript<U>名称-值</U>数组对替换而已。记得在这些名称中一定要使用"lang_"前缀,以免其跟模板中的其他变量冲突。<BR>
|
||||
以下例子表明了cut, copy和paste的文字语言是如何被处理的:<BR>
|
||||
<br>
|
||||
<table border="0" cellspacing="3" cellpadding="2" class="sample">
|
||||
<tr>
|
||||
|
||||
<td class="samplecontent">tinyMCELang['<font color="#CC0000">lang</font>_cut_desc']
|
||||
= 'Cut (Ctrl+X)';<br>
|
||||
tinyMCELang['<font color="#CC0000">lang</font>_copy_desc'] = 'Copy (Ctrl+C)';<br>
|
||||
tinyMCELang['<font color="#CC0000">lang</font>_paste_desc'] = 'Paste (Ctrl+P)';</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>注意有两种类型的语言包,一种是被全部主题所共享的全局语言,它在"jscripts/tiny_mce/langs"目录中;<BR>另外一种是某主题特定语言,一般放在"jscripts/tiny_mce/themes/<some theme>/langs"目录中。<br>
|
||||
<p>当翻译TinyMCE时,以下是目前所需要翻译的文件:<br>
|
||||
<br>
|
||||
tinymce/jscripts/tiny_mce/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/emotions/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/iespell/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/plugins/preview/langs/uk.js<br>
|
||||
tinymce/jscripts/tiny_mce/themes/advanced/langs/uk.js<br>
|
||||
<br>注意某些语言变量可能会包含gif图片的name/url或类似,例如在瑞典语言包中粗体的按钮有一个"F"字符。</p>
|
||||
<hr noshade>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
|
||||
<tr>
|
||||
<td>返回 <a href="index.htm">内容提要</a></td>
|
||||
<td align="right"><a href="#">顶部</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
||||
388
www/extras/tinymce/docs/zh_cn/license.htm
Normal file
388
www/extras/tinymce/docs/zh_cn/license.htm
Normal file
|
|
@ -0,0 +1,388 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>License</TITLE>
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
|
||||
<tr>
|
||||
<td><span class="title">License</span></td>
|
||||
<td align="right"><a href="index.htm">TOC</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<strong>Copyright © 2004 Moxiecode Systems AB</strong><br>
|
||||
<br>
|
||||
This library is free software; you can redistribute it and/or<br>
|
||||
modify it under the terms of the <strong>GNU Lesser General Public<br>
|
||||
License</strong> as published by the Free Software Foundation; either<br>
|
||||
version 2.1 of the License, or (at your option) any later version.<br>
|
||||
<br>
|
||||
This library is distributed in the hope that it will be useful,<br>
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br>
|
||||
Lesser General Public License for more details.<br>
|
||||
<br>
|
||||
You should have received a copy of the GNU Lesser General Public<br>
|
||||
License along with this library; if not, write to the Free Software<br>
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br>
|
||||
<br>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<strong>GNU Lesser General Public License<br>
|
||||
Version 2.1, February 1999 </strong>
|
||||
<p>Copyright (C) 1991, 1999 Free Software Foundation, Inc.<br>
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br>
|
||||
Everyone is permitted to copy and distribute verbatim copies<br>
|
||||
of this license document, but changing it is not allowed.</p>
|
||||
<p>[This is the first released version of the Lesser GPL. It also counts<br>
|
||||
as the successor of the GNU Library Public License, version 2, hence<br>
|
||||
the version number 2.1.]</p>
|
||||
<p>Preamble<br>
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public Licenses are intended to
|
||||
guarantee your freedom to share and change free software--to make sure the software
|
||||
is free for all its users. </p>
|
||||
<p>This license, the Lesser General Public License, applies to some specially
|
||||
designated software packages--typically libraries--of the Free Software Foundation
|
||||
and other authors who decide to use it. You can use it too, but we suggest you
|
||||
first think carefully about whether this license or the ordinary General Public
|
||||
License is the better strategy to use in any particular case, based on the explanations
|
||||
below. </p>
|
||||
<p>When we speak of free software, we are referring to freedom of use, not price.
|
||||
Our General Public Licenses are designed to make sure that you have the freedom
|
||||
to distribute copies of free software (and charge for this service if you wish);
|
||||
that you receive source code or can get it if you want it; that you can change
|
||||
the software and use pieces of it in new free programs; and that you are informed
|
||||
that you can do these things.</p>
|
||||
<p>To protect your rights, we need to make restrictions that forbid distributors
|
||||
to deny you these rights or to ask you to surrender these rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of the
|
||||
library or if you modify it. </p>
|
||||
<p>For example, if you distribute copies of the library, whether gratis or for
|
||||
a fee, you must give the recipients all the rights that we gave you. You must
|
||||
make sure that they, too, receive or can get the source code. If you link other
|
||||
code with the library, you must provide complete object files to the recipients,
|
||||
so that they can relink them with the library after making changes to the library
|
||||
and recompiling it. And you must show them these terms so they know their rights.
|
||||
</p>
|
||||
<p>We protect your rights with a two-step method: (1) we copyright the library,
|
||||
and (2) we offer you this license, which gives you legal permission to copy,
|
||||
distribute and/or modify the library. </p>
|
||||
<p>To protect each distributor, we want to make it very clear that there is no
|
||||
warranty for the free library. Also, if the library is modified by someone else
|
||||
and passed on, the recipients should know that what they have is not the original
|
||||
version, so that the original author's reputation will not be affected by problems
|
||||
that might be introduced by others. </p>
|
||||
<p>Finally, software patents pose a constant threat to the existence of any free
|
||||
program. We wish to make sure that a company cannot effectively restrict the
|
||||
users of a free program by obtaining a restrictive license from a patent holder.
|
||||
Therefore, we insist that any patent license obtained for a version of the library
|
||||
must be consistent with the full freedom of use specified in this license. </p>
|
||||
<p>Most GNU software, including some libraries, is covered by the ordinary GNU
|
||||
General Public License. This license, the GNU Lesser General Public License,
|
||||
applies to certain designated libraries, and is quite different from the ordinary
|
||||
General Public License. We use this license for certain libraries in order to
|
||||
permit linking those libraries into non-free programs. </p>
|
||||
<p>When a program is linked with a library, whether statically or using a shared
|
||||
library, the combination of the two is legally speaking a combined work, a derivative
|
||||
of the original library. The ordinary General Public License therefore permits
|
||||
such linking only if the entire combination fits its criteria of freedom. The
|
||||
Lesser General Public License permits more lax criteria for linking other code
|
||||
with the library. </p>
|
||||
<p>We call this license the "Lesser" General Public License because
|
||||
it does Less to protect the user's freedom than the ordinary General Public
|
||||
License. It also provides other free software developers Less of an advantage
|
||||
over competing non-free programs. These disadvantages are the reason we use
|
||||
the ordinary General Public License for many libraries. However, the Lesser
|
||||
license provides advantages in certain special circumstances. </p>
|
||||
<p>For example, on rare occasions, there may be a special need to encourage the
|
||||
widest possible use of a certain library, so that it becomes a de-facto standard.
|
||||
To achieve this, non-free programs must be allowed to use the library. A more
|
||||
frequent case is that a free library does the same job as widely used non-free
|
||||
libraries. In this case, there is little to gain by limiting the free library
|
||||
to free software only, so we use the Lesser General Public License. </p>
|
||||
<p>In other cases, permission to use a particular library in non-free programs
|
||||
enables a greater number of people to use a large body of free software. For
|
||||
example, permission to use the GNU C Library in non-free programs enables many
|
||||
more people to use the whole GNU operating system, as well as its variant, the
|
||||
GNU/Linux operating system. </p>
|
||||
<p>Although the Lesser General Public License is Less protective of the users'
|
||||
freedom, it does ensure that the user of a program that is linked with the Library
|
||||
has the freedom and the wherewithal to run that program using a modified version
|
||||
of the Library. </p>
|
||||
<p>The precise terms and conditions for copying, distribution and modification
|
||||
follow. Pay close attention to the difference between a "work based on
|
||||
the library" and a "work that uses the library". The former contains
|
||||
code derived from the library, whereas the latter must be combined with the
|
||||
library in order to run. </p>
|
||||
<p>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION<br>
|
||||
0. This License Agreement applies to any software library or other program which
|
||||
contains a notice placed by the copyright holder or other authorized party saying
|
||||
it may be distributed under the terms of this Lesser General Public License
|
||||
(also called "this License"). Each licensee is addressed as "you".</p>
|
||||
<p>A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs (which use
|
||||
some of those functions and data) to form executables. </p>
|
||||
<p>The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the Library"
|
||||
means either the Library or any derivative work under copyright law: that is
|
||||
to say, a work containing the Library or a portion of it, either verbatim or
|
||||
with modifications and/or translated straightforwardly into another language.
|
||||
(Hereinafter, translation is included without limitation in the term "modification".)
|
||||
</p>
|
||||
<p>"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means all the
|
||||
source code for all modules it contains, plus any associated interface definition
|
||||
files, plus the scripts used to control compilation and installation of the
|
||||
library.</p>
|
||||
<p>Activities other than copying, distribution and modification are not covered
|
||||
by this License; they are outside its scope. The act of running a program using
|
||||
the Library is not restricted, and output from such a program is covered only
|
||||
if its contents constitute a work based on the Library (independent of the use
|
||||
of the Library in a tool for writing it). Whether that is true depends on what
|
||||
the Library does and what the program that uses the Library does. </p>
|
||||
<p>1. You may copy and distribute verbatim copies of the Library's complete source
|
||||
code as you receive it, in any medium, provided that you conspicuously and appropriately
|
||||
publish on each copy an appropriate copyright notice and disclaimer of warranty;
|
||||
keep intact all the notices that refer to this License and to the absence of
|
||||
any warranty; and distribute a copy of this License along with the Library.
|
||||
</p>
|
||||
<p>You may charge a fee for the physical act of transferring a copy, and you may
|
||||
at your option offer warranty protection in exchange for a fee. </p>
|
||||
<p>2. You may modify your copy or copies of the Library or any portion of it,
|
||||
thus forming a work based on the Library, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all
|
||||
of these conditions: </p>
|
||||
<p>a) The modified work must itself be a software library. </p>
|
||||
<p>b) You must cause the files modified to carry prominent notices stating that
|
||||
you changed the files and the date of any change.</p>
|
||||
<p>c) You must cause the whole of the work to be licensed at no charge to all
|
||||
third parties under the terms of this License. </p>
|
||||
<p>d) If a facility in the modified Library refers to a function or a table of
|
||||
data to be supplied by an application program that uses the facility, other
|
||||
than as an argument passed when the facility is invoked, then you must make
|
||||
a good faith effort to ensure that, in the event an application does not supply
|
||||
such function or table, the facility still operates, and performs whatever part
|
||||
of its purpose remains meaningful. </p>
|
||||
<p>(For example, a function in a library to compute square roots has a purpose
|
||||
that is entirely well-defined independent of the application. Therefore, Subsection
|
||||
2d requires that any application-supplied function or table used by this function
|
||||
must be optional: if the application does not supply it, the square root function
|
||||
must still compute square roots.) </p>
|
||||
<p>These requirements apply to the modified work as a whole. If identifiable sections
|
||||
of that work are not derived from the Library, and can be reasonably considered
|
||||
independent and separate works in themselves, then this License, and its terms,
|
||||
do not apply to those sections when you distribute them as separate works. But
|
||||
when you distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of this License,
|
||||
whose permissions for other licensees extend to the entire whole, and thus to
|
||||
each and every part regardless of who wrote it. </p>
|
||||
<p>Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise the
|
||||
right to control the distribution of derivative or collective works based on
|
||||
the Library. </p>
|
||||
<p>In addition, mere aggregation of another work not based on the Library with
|
||||
the Library (or with a work based on the Library) on a volume of a storage or
|
||||
distribution medium does not bring the other work under the scope of this License.
|
||||
</p>
|
||||
<p>3. You may opt to apply the terms of the ordinary GNU General Public License
|
||||
instead of this License to a given copy of the Library. To do this, you must
|
||||
alter all the notices that refer to this License, so that they refer to the
|
||||
ordinary GNU General Public License, version 2, instead of to this License.
|
||||
(If a newer version than version 2 of the ordinary GNU General Public License
|
||||
has appeared, then you can specify that version instead if you wish.) Do not
|
||||
make any other change in these notices. </p>
|
||||
<p>Once this change is made in a given copy, it is irreversible for that copy,
|
||||
so the ordinary GNU General Public License applies to all subsequent copies
|
||||
and derivative works made from that copy. </p>
|
||||
<p>This option is useful when you wish to copy part of the code of the Library
|
||||
into a program that is not a library. </p>
|
||||
<p>4. You may copy and distribute the Library (or a portion or derivative of it,
|
||||
under Section 2) in object code or executable form under the terms of Sections
|
||||
1 and 2 above provided that you accompany it with the complete corresponding
|
||||
machine-readable source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange. </p>
|
||||
<p>If distribution of object code is made by offering access to copy from a designated
|
||||
place, then offering equivalent access to copy the source code from the same
|
||||
place satisfies the requirement to distribute the source code, even though third
|
||||
parties are not compelled to copy the source along with the object code.</p>
|
||||
<p>5. A program that contains no derivative of any portion of the Library, but
|
||||
is designed to work with the Library by being compiled or linked with it, is
|
||||
called a "work that uses the Library". Such a work, in isolation,
|
||||
is not a derivative work of the Library, and therefore falls outside the scope
|
||||
of this License. </p>
|
||||
<p>However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it contains
|
||||
portions of the Library), rather than a "work that uses the library".
|
||||
The executable is therefore covered by this License. Section 6 states terms
|
||||
for distribution of such executables. </p>
|
||||
<p>When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a derivative
|
||||
work of the Library even though the source code is not. Whether this is true
|
||||
is especially significant if the work can be linked without the Library, or
|
||||
if the work is itself a library. The threshold for this to be true is not precisely
|
||||
defined by law. </p>
|
||||
<p>If such an object file uses only numerical parameters, data structure layouts
|
||||
and accessors, and small macros and small inline functions (ten lines or less
|
||||
in length), then the use of the object file is unrestricted, regardless of whether
|
||||
it is legally a derivative work. (Executables containing this object code plus
|
||||
portions of the Library will still fall under Section 6.) </p>
|
||||
<p>Otherwise, if the work is a derivative of the Library, you may distribute the
|
||||
object code for the work under the terms of Section 6. Any executables containing
|
||||
that work also fall under Section 6, whether or not they are linked directly
|
||||
with the Library itself. </p>
|
||||
<p>6. As an exception to the Sections above, you may also combine or link a "work
|
||||
that uses the Library" with the Library to produce a work containing portions
|
||||
of the Library, and distribute that work under terms of your choice, provided
|
||||
that the terms permit modification of the work for the customer's own use and
|
||||
reverse engineering for debugging such modifications. </p>
|
||||
<p>You must give prominent notice with each copy of the work that the Library
|
||||
is used in it and that the Library and its use are covered by this License.
|
||||
You must supply a copy of this License. If the work during execution displays
|
||||
copyright notices, you must include the copyright notice for the Library among
|
||||
them, as well as a reference directing the user to the copy of this License.
|
||||
Also, you must do one of these things: </p>
|
||||
<p>a) Accompany the work with the complete corresponding machine-readable source
|
||||
code for the Library including whatever changes were used in the work (which
|
||||
must be distributed under Sections 1 and 2 above); and, if the work is an executable
|
||||
linked with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the user
|
||||
can modify the Library and then relink to produce a modified executable containing
|
||||
the modified Library. (It is understood that the user who changes the contents
|
||||
of definitions files in the Library will not necessarily be able to recompile
|
||||
the application to use the modified definitions.) </p>
|
||||
<p>b) Use a suitable shared library mechanism for linking with the Library. A
|
||||
suitable mechanism is one that (1) uses at run time a copy of the library already
|
||||
present on the user's computer system, rather than copying library functions
|
||||
into the executable, and (2) will operate properly with a modified version of
|
||||
the library, if the user installs one, as long as the modified version is interface-compatible
|
||||
with the version that the work was made with. </p>
|
||||
<p>c) Accompany the work with a written offer, valid for at least three years,
|
||||
to give the same user the materials specified in Subsection 6a, above, for a
|
||||
charge no more than the cost of performing this distribution. </p>
|
||||
<p>d) If distribution of the work is made by offering access to copy from a designated
|
||||
place, offer equivalent access to copy the above specified materials from the
|
||||
same place. </p>
|
||||
<p>e) Verify that the user has already received a copy of these materials or that
|
||||
you have already sent this user a copy.</p>
|
||||
<p>For an executable, the required form of the "work that uses the Library"
|
||||
must include any data and utility programs needed for reproducing the executable
|
||||
from it. However, as a special exception, the materials to be distributed need
|
||||
not include anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the operating
|
||||
system on which the executable runs, unless that component itself accompanies
|
||||
the executable. </p>
|
||||
<p>It may happen that this requirement contradicts the license restrictions of
|
||||
other proprietary libraries that do not normally accompany the operating system.
|
||||
Such a contradiction means you cannot use both them and the Library together
|
||||
in an executable that you distribute. </p>
|
||||
<p>7. You may place library facilities that are a work based on the Library side-by-side
|
||||
in a single library together with other library facilities not covered by this
|
||||
License, and distribute such a combined library, provided that the separate
|
||||
distribution of the work based on the Library and of the other library facilities
|
||||
is otherwise permitted, and provided that you do these two things: </p>
|
||||
<p>a) Accompany the combined library with a copy of the same work based on the
|
||||
Library, uncombined with any other library facilities. This must be distributed
|
||||
under the terms of the Sections above. </p>
|
||||
<p>b) Give prominent notice with the combined library of the fact that part of
|
||||
it is a work based on the Library, and explaining where to find the accompanying
|
||||
uncombined form of the same work.</p>
|
||||
<p>8. You may not copy, modify, sublicense, link with, or distribute the Library
|
||||
except as expressly provided under this License. Any attempt otherwise to copy,
|
||||
modify, sublicense, link with, or distribute the Library is void, and will automatically
|
||||
terminate your rights under this License. However, parties who have received
|
||||
copies, or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance. </p>
|
||||
<p>9. You are not required to accept this License, since you have not signed it.
|
||||
However, nothing else grants you permission to modify or distribute the Library
|
||||
or its derivative works. These actions are prohibited by law if you do not accept
|
||||
this License. Therefore, by modifying or distributing the Library (or any work
|
||||
based on the Library), you indicate your acceptance of this License to do so,
|
||||
and all its terms and conditions for copying, distributing or modifying the
|
||||
Library or works based on it. </p>
|
||||
<p>10. Each time you redistribute the Library (or any work based on the Library),
|
||||
the recipient automatically receives a license from the original licensor to
|
||||
copy, distribute, link with or modify the Library subject to these terms and
|
||||
conditions. You may not impose any further restrictions on the recipients' exercise
|
||||
of the rights granted herein. You are not responsible for enforcing compliance
|
||||
by third parties with this License. </p>
|
||||
<p>11. If, as a consequence of a court judgment or allegation of patent infringement
|
||||
or for any other reason (not limited to patent issues), conditions are imposed
|
||||
on you (whether by court order, agreement or otherwise) that contradict the
|
||||
conditions of this License, they do not excuse you from the conditions of this
|
||||
License. If you cannot distribute so as to satisfy simultaneously your obligations
|
||||
under this License and any other pertinent obligations, then as a consequence
|
||||
you may not distribute the Library at all. For example, if a patent license
|
||||
would not permit royalty-free redistribution of the Library by all those who
|
||||
receive copies directly or indirectly through you, then the only way you could
|
||||
satisfy both it and this License would be to refrain entirely from distribution
|
||||
of the Library. </p>
|
||||
<p>If any portion of this section is held invalid or unenforceable under any particular
|
||||
circumstance, the balance of the section is intended to apply, and the section
|
||||
as a whole is intended to apply in other circumstances. </p>
|
||||
<p>It is not the purpose of this section to induce you to infringe any patents
|
||||
or other property right claims or to contest validity of any such claims; this
|
||||
section has the sole purpose of protecting the integrity of the free software
|
||||
distribution system which is implemented by public license practices. Many people
|
||||
have made generous contributions to the wide range of software distributed through
|
||||
that system in reliance on consistent application of that system; it is up to
|
||||
the author/donor to decide if he or she is willing to distribute software through
|
||||
any other system and a licensee cannot impose that choice. </p>
|
||||
<p>This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License. </p>
|
||||
<p>12. If the distribution and/or use of the Library is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original copyright
|
||||
holder who places the Library under this License may add an explicit geographical
|
||||
distribution limitation excluding those countries, so that distribution is permitted
|
||||
only in or among countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License. </p>
|
||||
<p>13. The Free Software Foundation may publish revised and/or new versions of
|
||||
the Lesser General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to address
|
||||
new problems or concerns.</p>
|
||||
<p>Each version is given a distinguishing version number. If the Library specifies
|
||||
a version number of this License which applies to it and "any later version",
|
||||
you have the option of following the terms and conditions either of that version
|
||||
or of any later version published by the Free Software Foundation. If the Library
|
||||
does not specify a license version number, you may choose any version ever published
|
||||
by the Free Software Foundation. </p>
|
||||
<p>14. If you wish to incorporate parts of the Library into other free programs
|
||||
whose distribution conditions are incompatible with these, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free Software
|
||||
Foundation, write to the Free Software Foundation; we sometimes make exceptions
|
||||
for this. Our decision will be guided by the two goals of preserving the free
|
||||
status of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally. </p>
|
||||
<p>NO WARRANTY </p>
|
||||
<p>15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY
|
||||
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
|
||||
OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE
|
||||
COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. </p>
|
||||
<p>16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
||||
THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
|
||||
OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
|
||||
DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR
|
||||
A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER
|
||||
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. <br>
|
||||
</p>
|
||||
<hr noshade>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
|
||||
<tr>
|
||||
<td>Go to: <a href="index.htm">Table of contents</a></td>
|
||||
<td align="right"><a href="#">Top</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</BODY>
|
||||
</HTML>
|
||||
439
www/extras/tinymce/docs/zh_cn/themes.htm
Normal file
439
www/extras/tinymce/docs/zh_cn/themes.htm
Normal file
|
|
@ -0,0 +1,439 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>创建主题</TITLE>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
|
||||
<tr>
|
||||
<td class="title">创建主题及插件</td>
|
||||
<td align="right"><a href="index.htm">内容提要</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<span class="subtitle">创建你自己的主题与插件</span><br>
|
||||
<br>如果你懂得HTML,CSS和Javascript的基础知识,为TinyMCE创建自己的主题是相当容易的事情。<BR>最简单的方法莫过于将"default"或者"advanced"模板拷贝,并将它重命名为你自己的主题名称,例如:"mytheme"。<BR>然后你需要把以下片断中的红色标记更改为"mytheme",这样各种主题就不会冲突。换句话说,给这个主题指定了唯一的名字。<BR>更改里面的HTML代码使之适合你的主题,但需要注意,某些组件是必须的,所以更改以下的每个函数时都请查看相应文档。<BR>此外,自定义主题必须做为子目录放在tiny_mce的"themes"目录下。<BR>如果需要,你完全可以为自己的主题增加特定的选项和设置,不过记得要用以下的命名规则:"theme_<your theme>_<option>"。<br>
|
||||
<br>以下示例有三个函数,下面会详细介绍。<br>
|
||||
<br>
|
||||
|
||||
<table border="0" cellspacing="3" cellpadding="2" class="sample">
|
||||
<tr>
|
||||
|
||||
<td class="samplecontent">function TinyMCE_<font color="#CC0000">default</font>_getEditorTemplate(settings)
|
||||
{<br>
|
||||
var template = new Array();<br>
|
||||
<br> template['html'] = '<Some HTML>';<br>
|
||||
template['delta_width'] = 0;<br>
|
||||
template['delta_height'] = -40;<br>
|
||||
<br>
|
||||
return template;<br>
|
||||
}
|
||||
<p>function TinyMCE_<font color="#CC0000">default</font>_getInsertLinkTemplate(settings)
|
||||
{<br>
|
||||
var template = new Array();<br>
|
||||
<br>
|
||||
template['file'] = 'link.htm';<br>
|
||||
template['width'] = 320;<br>
|
||||
template['height'] = 130;<br>
|
||||
<br>
|
||||
return template;<br>
|
||||
}<br>
|
||||
<br>
|
||||
function TinyMCE_<font color="#CC0000">default</font>_getInsertImageTemplate(settings)
|
||||
{<br>
|
||||
var template = new Array();<br>
|
||||
<br>
|
||||
template['file'] = 'image.htm';<br>
|
||||
template['width'] = 320;<br>
|
||||
template['height'] = 130;<br>
|
||||
<br>
|
||||
return template;<br>
|
||||
}<br>
|
||||
<br>
|
||||
function TinyMCE_<font color="#CC0000">default</font>_handleNodeChange(editor_id,
|
||||
node) {<br>
|
||||
// Check what happend<br>
|
||||
}<br>
|
||||
<br>
|
||||
function TinyMCE_<font color="#CC0000">default</font>_execCommand(editor_id, element, command, user_interface, value)
|
||||
{<br>
|
||||
//
|
||||
Your custom command logic<br>
|
||||
return false; <br>
|
||||
}
|
||||
<br>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<hr noshade>
|
||||
<p class="subtitle">使用外部模板文件</p>
|
||||
<p>当用下面所描述的"file"参数使用外部模板文件时,需要把"tiny_mce_popup.js"包含进来。<BR>为了跟TinyMCE通讯,此文件是必须的。所有的变量和语言定义在"html"属性中被替换。
|
||||
</p>外部模板文件示例:
|
||||
<br>
|
||||
<br>
|
||||
<table border="0" cellspacing="3" cellpadding="2" class="sample">
|
||||
<tr>
|
||||
<td class="samplecontent"><html><br>
|
||||
<head><br>
|
||||
<title><span class="failed">{$lang_theme_sample_title}</span></title><br>
|
||||
<script language="javascript" src="<span class="failed">../../tiny_mce_popup.js</span>"></script><br>
|
||||
<script language="javascript"><br>
|
||||
alert(<span class="failed">tinyMCE.getWindowArg('some_arg')</span>);<br>
|
||||
</script>
|
||||
<br>
|
||||
<body><br>
|
||||
<span class="failed">{$lang_theme_sample_desc}</span><br>
|
||||
</body>
|
||||
</td>
|
||||
</tr>
|
||||
</table><BR>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<span class="subtitle">函数 TinyMCE_<font color="#CC0000"><<font color="#CC0000">theme or plugin</font>></font>_getEditorTemplate(settings)</span></p>
|
||||
<p>此函数负责编辑器实例在页面中的布局,它返回包含特定名称的<U>名称-值</U>对的数组。解释如下,注意用[]括起来的名称是可选的。<BR>此函数的settings参数是一个包含了tinyMCE设置和选项的<U>名称-值</U>对的数组。</p>
|
||||
<strong>模板数据:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>html</strong></td>
|
||||
<td>HTML模板数据,它的值是实现编辑器所需的全部HTML代码。注意:在使用时{$<variable>}会被实际的值替换。关于这些特定值的更详细说明见后面。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[delta_width]</strong></td>
|
||||
<td>Delta宽度,此值包含用户界面所需的相关宽度。例如,工具栏需要20象素,则此值为-20。<BR>
|
||||
这也是为什么编辑器的尺寸跟它所替换的组件宽度一致的原因。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[delta_height]</strong></td>
|
||||
<td>Delta高度,此值包含用户界面所需的相关高度。例如,工具栏需要40象素,则此值为-40。<BR>
|
||||
这也是为什么编辑器的尺寸跟它所替换的组件宽度一致的原因。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>上述"html"中的变量被TinyMCE的内部值所替换。有两种不同类型的变量,一种是以"lang_"为前缀的,它们会被相应名称的语言包替换。例如,<b>{$lang_test}</b>被语言变量"tinyMCELang['lang_test']"所替换,输出就成了<b>Test</b>。<BR>另外的变量是所用模板直接传递的,列举如下。 注意用[]括起来的变量是可选的。<br>
|
||||
<br>
|
||||
<strong>变量:</strong></p>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>editor_id</strong></td>
|
||||
<td>此为编辑器实例的ID,它应当被放在模板必须包含的IFRAME组件的ID属性中。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[default_document]</strong></td>
|
||||
<td>为了解决MSIE的安全问题,增加了此设置,它会被替换成空白HTML页面。把它放在模板IFRAME组件的SRC属性中。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE"><strong>[area_width]</strong></td>
|
||||
<td>IFRAME区域的宽度,以象素为单位。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE"><strong>[area_height]</strong></td>
|
||||
<td>IFRAME区域的高度,以象素为单位。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE"><strong>[width]</strong></td>
|
||||
<td>整个编辑器区域的宽度,以象素为单位。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE"><strong>[height]</strong></td>
|
||||
<td>整个编辑器区域的高度,以象素为单位。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE"><strong>[themeurl]</strong></td>
|
||||
<td>主题所在位置的URL。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>注意:从这个模板可以调用两个JavaScript函数,它们是:在当前选定编辑器区域中执行命令的tinyMCE.execCommand及切换特定组件CSS类的tinyMCE.switchClass。<BR>
|
||||
欲了解execCommand中可以执行的更多命令细节,请查看 <a href="http://www.mozilla.org/editor/midas-spec.html" target="_blank">Mozilla midas specification</a> 和 <a href="using.htm#execcommand">TinyMCE specific commands</a>. <br>
|
||||
</p>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<span class="subtitle">函数 TinyMCE_<font color="#CC0000"><<font color="#CC0000">theme or plugin</font>></font>_getInsertLinkTemplate(settings)</span>
|
||||
<p>此函数负责插入链接弹出窗口的布局,它返回包含特定名称的<U>名称-值</U>对的数组。解释如下,注意用[]括起来的名称是可选的。<BR>此函数的settings参数是一个包含了tinyMCE设置和选项的<U>名称-值</U>对的数组。</p>
|
||||
<strong>模板数据:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>html</strong></td>
|
||||
<td>HTML模板数据,它的值是实现链接对话框所需的全部HTML代码。注意:在使用时{$<variable>}会被实际的值替换。关于这些特定值的更详细说明见后面。如果"file"参数有赋值,此参数不是必须的。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td bgcolor="#EEEEEE"><strong>file</strong></td>
|
||||
<td>要使用的外部模板文件的名称,它可以是像.php,.asp,.jsp这样的动态页。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[width]</strong></td>
|
||||
<td>弹出窗口的宽度,以象素为单位,默认为320.</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[height]</strong></td>
|
||||
<td>弹出窗口的高度,以象素为单位,默认为200.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>上述"html"中的变量被TinyMCE的内部值所替换。有两种不同类型的变量,一种是以"lang_"为前缀的,它们会被相应名称的语言包替换。例如,<b>{$lang_test}</b>被语言变量"tinyMCELang['lang_test']"所替换,输出就成了<b>Test</b>。<BR>另外的变量是所用模板直接传递的,列举如下。 注意用[]括起来的变量是可选的。<br>
|
||||
<br>
|
||||
<strong>变量/窗口 参数:</strong></p>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[href]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个链接,此变量被链接中的"href"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[target]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个链接,此变量被链接中的"target"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[css]</strong></td>
|
||||
<td bgcolor="#FFFFFF">主题中弹出窗口CSS的位置。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>注意:从这个模板中可以调用"window.opener.tinyMCE.insertLink(href, target)"这个javascript函数,它的作用是是在当前选定的编辑器中插入链接,并且应当在"插入"按钮按下时被调用。</p>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<span class="subtitle">函数 TinyMCE_<font color="#CC0000"><<font color="#CC0000">theme or plugin</font>></font>_getInsertImageTemplate(settings)</span>
|
||||
<p>此函数负责插入图像弹出窗口的布局,它返回包含特定名称的<U>名称-值</U>对的数组。解释如下,注意用[]括起来的名称是可选的。<BR>此函数的settings参数是一个包含了tinyMCE设置和选项的<U>名称-值</U>对的数组。</p>
|
||||
<strong>模板数据:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>html</strong></td>
|
||||
<td bgcolor="#FFFFFF">HTML模板数据,它的值是实现图像对话框所需的全部HTML代码。注意:在使用时{$<variable>}会被实际的值替换。关于这些特定值的更详细说明见后面。如果"file"参数有赋值,此参数不是必须的。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>file</strong></td>
|
||||
<td bgcolor="#FFFFFF">要使用的外部模板文件的名称,它可以是像.php,.asp,.jsp这样的动态页。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[width]</strong></td>
|
||||
<td bgcolor="#FFFFFF">弹出窗口的宽度,以象素为单位,默认为320.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[height]</strong></td>
|
||||
<td bgcolor="#FFFFFF">弹出窗口的高度,以象素为单位,默认为200.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>上述"html"中的变量被TinyMCE的内部值所替换。有两种不同类型的变量,一种是以"lang_"为前缀的,它们会被相应名称的语言包替换。例如,<b>{$lang_test}</b>被语言变量"tinyMCELang['lang_test']"所替换,输出就成了<b>Test</b>。<BR>另外的变量是所用模板直接传递的,列举如下。 注意用[]括起来的变量是可选的。<br>
|
||||
<br>
|
||||
<strong>变量/窗口 参数:</strong></p>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[src]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"src"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[alt]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"alt"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[border]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"border"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[hspace]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"hspace"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[vspace]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"vspace"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[width]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"width"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[height]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"height"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[align]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个图像,此变量被图像中的"align"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[css]</strong></td>
|
||||
<td bgcolor="#FFFFFF">主题中弹出窗口CSS的位置。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>注意:从这个模板中可以调用"window.opener.tinyMCE.insertImage(src, alt, border, hspace, vspace, width,
|
||||
height, align)"这个javascript函数,它的作用是是在当前选定的编辑器中插入图像,并且应当在"插入"按钮按下时被调用。</p>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<span class="subtitle">函数 TinyMCE_<font color="#CC0000"><<font color="#CC0000">theme or plugin</font>></font>_getInsertTableTemplate(settings)</span>
|
||||
<span class="subtitle">(可选)</span>
|
||||
<p>此函数负责插入表格弹出窗口的布局,它返回包含特定名称的<U>名称-值</U>对的数组。解释如下,注意用[]括起来的名称是可选的。<BR>此函数的settings参数是一个包含了tinyMCE设置和选项的<U>名称-值</U>对的数组。</p>
|
||||
<strong>模板数据:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>html</strong></td>
|
||||
<td bgcolor="#FFFFFF">HTML模板数据,它的值是实现表格对话框所需的全部HTML代码。注意:在使用时{$<variable>}会被实际的值替换。关于这些特定值的更详细说明见后面。如果"file"参数有赋值,此参数不是必须的。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>file</strong></td>
|
||||
<td bgcolor="#FFFFFF">要使用的外部模板文件的名称,它可以是像.php,.asp,.jsp这样的动态页。 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[width]</strong></td>
|
||||
<td bgcolor="#FFFFFF">弹出窗口的宽度,以象素为单位。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[height]</strong></td>
|
||||
<td bgcolor="#FFFFFF">弹出窗口的高度,以象素为单位。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>上述"html"中的变量被TinyMCE的内部值所替换。有两种不同类型的变量,一种是以"lang_"为前缀的,它们会被相应名称的语言包替换。例如,<b>{$lang_test}</b>被语言变量"tinyMCELang['lang_test']"所替换,输出就成了<b>Test</b>。<BR>另外的变量是所用模板直接传递的,列举如下。 注意用[]括起来的变量是可选的。<br>
|
||||
<br>
|
||||
<strong>变量/窗口 参数:</strong></p>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>[cols]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的列数所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[rows]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的行数所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[border]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的"border"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[cellpadding]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的"cellpadding"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[cellspacing]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的"cellspacing"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[width]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的"width"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[height]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的"height"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[align]</strong></td>
|
||||
<td bgcolor="#FFFFFF">如果有选定一个表格,此变量会被表格的"align"属性值所替代。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>[action]</strong></td>
|
||||
<td bgcolor="#FFFFFF">根据用户是选择了一个表格还是创建一个新的表格来选择操作类型是"update"还是"insert"。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<hr noshade>
|
||||
<span class="subtitle">函数 TinyMCE_<font color="#CC0000"><<font color="#CC0000">theme or plugin</font>></font>_handleNodeChange (可选)</span>
|
||||
<p>此函数在某个编辑器实例的聚焦状态发生改变时被调用,当前新聚焦的节点被做为参数传递给此函数。这对于你需要根据用户的选择来改变用户界面非常有用。</p>
|
||||
<strong>参数:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>editor_id</strong></td>
|
||||
<td bgcolor="#FFFFFF">编辑器的唯一ID号,这跟getEditorTemplate中的$editor_id变量一致。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>node</strong></td>
|
||||
<td bgcolor="#FFFFFF">当前鼠标所在位置节点的引用。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>undo_index</strong></td>
|
||||
<td bgcolor="#FFFFFF">当前撤消索引,如果撤消/重做功能被禁用,其值为-1。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>undo_levels</strong></td>
|
||||
<td bgcolor="#FFFFFF">当前撤消层次的数目,如果撤消/重做功能被禁用,其值为-1。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>visual_aid</strong></td>
|
||||
<td bgcolor="#FFFFFF">视觉帮助模式的状态,True/false。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>any_selection</strong></td>
|
||||
<td bgcolor="#FFFFFF">是否选定任何文字或图像。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<hr noshade>
|
||||
<span class="subtitle">函数 TinyMCE_<font color="#CC0000"><<font color="#CC0000">theme or plugin</font>></font>_execCommand (可选)</span>
|
||||
<p>当执行像"bold"或"createlink"这样的命令时,此方法被调用。然后此 回调/主题/插件 函数回中断主题特定命令,并执行客户逻辑。如果此命令返回true,命令处理被终止,默认的tinyMCE命令处理永远不会被执行。</p>
|
||||
<strong>参数:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>editor_id</strong></td>
|
||||
<td bgcolor="#FFFFFF">编辑器的唯一ID号,这跟getEditorTemplate中的$editor_id变量一致。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>element</strong></td>
|
||||
<td bgcolor="#FFFFFF">对编辑器实例中文档DOM根组件的引用。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>command</strong></td>
|
||||
<td bgcolor="#FFFFFF">要执行的命令,例如:"myCommand"。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><strong>user_interface</strong></td>
|
||||
<td bgcolor="#FFFFFF">是否使用用户界面,true/false选项。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>value</strong></td>
|
||||
<td bgcolor="#FFFFFF">要传给命令的自定义数据值,可以是任何数据类型。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<strong>返回:</strong> true - 命令被终止,命令处理不再继续;false - 继续execCommand处理,冒泡的。<br>
|
||||
<hr noshade>
|
||||
<span class="subtitle">函数 TinyMCE_<font color="#CC0000"><theme or plugin></font>_getControlHTML(control_name) (可选)</span>
|
||||
<p>当编辑器需要实现某个特定控制/按钮的时候此函数被调用,它返回的是那个控制的HTML模板,如果控制的名字不能被识别则返回空串。<BR>注意变量{$pluginurl}会被当前插件目录的URL前缀所替换。</p>
|
||||
<strong>参数:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><span class="subtitle">control_name</span></td>
|
||||
<td bgcolor="#FFFFFF">要匹配的的控制的名称。例如,"iespell"代表的是iespell插件。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<strong>返回:</strong>返回的该控制的HTML模板,如果控制的名字不能被识别则返回空串。
|
||||
<hr noshade>
|
||||
<span class="subtitle"><a name="cleanup"></a>函数 TinyMCE_<font color="#CC0000"><plugin></font>_cleanup(type, content) (可选)</span>
|
||||
<p>当编辑器对内容进行清理时此函数被调用。</p>
|
||||
<strong>参数:<br>
|
||||
<br>
|
||||
</strong>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#000000">
|
||||
<tr>
|
||||
<td bgcolor="#EEEEEE"><span class="subtitle">type</span></td>
|
||||
<td bgcolor="#FFFFFF">清理的类型,insert_to_editor或者get_from_editor。<BR>
|
||||
当向编辑器中传递内容时使用insert_to_editor;当从编辑器中获取内容时使用get_from_editor。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" bgcolor="#EEEEEE"><strong>content</strong></td>
|
||||
<td bgcolor="#FFFFFF">要清理的HTML内容,该字符串包含了HTML代码。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<strong>返回:</strong>清理后的HTML代码。<br>
|
||||
<hr noshade>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
|
||||
<tr>
|
||||
<td>返回 <a href="index.htm">内容提要</a></td>
|
||||
<td align="right"><a href="#">顶部</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</BODY>
|
||||
</HTML>
|
||||
706
www/extras/tinymce/docs/zh_cn/using.htm
Normal file
706
www/extras/tinymce/docs/zh_cn/using.htm
Normal file
|
|
@ -0,0 +1,706 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>使用/集成TinyMCE</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
|
||||
<tr>
|
||||
<td><span class="title">使用/集成TinyMCE</span></td>
|
||||
<td align="right"><a href="index.htm">内容提要</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<br>
|
||||
<a name="init"></a>
|
||||
<span class="subtitle">初始化</span><br>
|
||||
<br>
|
||||
在初始化TinyMCE的时候,需要把以下代码加入到页面的HEAD标签中。按以下例子中的设置,所有的TEXTAREA文本域在页面加载时将被转换成编辑器。另外还有其他模块,我们将在后面详细讲述。<br>
|
||||
<br>
|
||||
<table border="0" cellspacing="3" cellpadding="2" class="sample">
|
||||
<tr>
|
||||
|
||||
<td class="samplecontent"><!-- tinyMCE --><br>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<font color="#990000">jscripts/tiny_mce/tiny_mce.js</font>"></script><br>
|
||||
<script language="javascript" type="text/javascript"><br>
|
||||
<font color="#000099">tinyMCE.init({<br>
|
||||
mode : "textareas"<br>
|
||||
});</font><br>
|
||||
</script><br>
|
||||
<!-- /tinyMCE --></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
注意以上红色部分是tiny_mce.js脚本文件的位置,该文件中包含了编辑器所需要的全部代码,主题及语言包将在初始化时被加载。<br>
|
||||
蓝色部分是初始化调用,它生成TinyMCE的全局实例,其中的设置及<U>名称-值</U>属性将在以后描述。<br>
|
||||
<br>
|
||||
<a name="settings" id="settings"></a> <span class="subtitle">设置</span><br>
|
||||
<br>
|
||||
以<U>名称-值</U>属性方式传递给tinyMCE的init方法的设置控制着程序的全局行为。所有的键及可能的键值如下表所示。注意,用[]括起来的名称是可选的,不是必须的设置。<br>
|
||||
<br>
|
||||
<table cellpadding="5" cellspacing="1" bgcolor="#111111">
|
||||
<tr bgcolor="#CCCCCC">
|
||||
<td colspan="2"><strong>常规设置</strong></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150"><strong>mode</strong></td>
|
||||
<td>Mode可以是以下几个值之一:<br>
|
||||
<br> <strong>textareas</strong>
|
||||
- 页面加载时把所有TEXTAREA组件转换成编辑器.<br> <strong>specific_textareas</strong>
|
||||
- 将所有"mce_editable"属性值为true的TEXTAREA转换成编辑器.<br>
|
||||
<strong>exact</strong> - 只转换在"elements"设置中指定的确切组件.</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150"><strong>[theme]</strong></td>
|
||||
<td>指定要使用的主题名称,主题将被放在TinyMCE的themes目录下,默认为default。TinyMCE自带三个内置的主题,它们是simple,default和advanced。<BR>
|
||||
如果你想创建自己的主题,请仔细阅读文档的 <a href="themes.htm">主题</a> 部分。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[plugins]</strong></td>
|
||||
<td>此选项是一系列以逗号分隔的主题插件列表(例如,可以只用来扩展图像对话框)。这些插件覆盖了主题模板中定义的功能。插件逻辑应该包含在一个叫"editor_plugin.js"的文件中,它是插件目录中唯一被包含进来的文件。<BR>
|
||||
例如:"my_image_dialog,my_link_dialog".
|
||||
<BR>如果你想创建自己的插件,请仔细阅读文档的 <a href="themes.htm">主题</a> 部分。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150"><strong>[language]</strong></td>
|
||||
<td>TinyMCE中使用的语言包,这应该是像se,uk,us等诸如此类的FN代码,它被用来从"langs"目录中获取语言包,该设置的默认值为"uk".<BR>
|
||||
中文用户建议您使用"zh-CN"</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150"><strong>[elements]</strong></td>
|
||||
<td>以逗号分隔的用来转换成编辑器的组件列表,该选项仅在"mode"选项被设置成"exact"时使用。该列表中的元素可以是任何有id或name属性的HTML组件。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[ask]</strong></td>
|
||||
<td>当"mode"被设置成"textareas"或"specific_textareas"的时候,该选项被应用,询问用户输入框是否将被转换成编辑器。 <BR>
|
||||
如果你想使用这个选项,将它设置为true.</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[textarea_trigger]</strong></td>
|
||||
<td>textarea(文本域)触发器的属性,默认值为"mce_editable"。<BR>
|
||||
该选项仅在"mode"被设置为"specific_textareas"时使用。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[valid_elements]</strong></td>
|
||||
<td>以逗号分隔开的组件转换部分的列表。<br>
|
||||
<br>
|
||||
例如: a[href|target=_blank],strong/b,div[align],br.<br> <br>
|
||||
以上例子告诉TinyMCE移除所有除了"a, strong, div"和"br"的组件,将元素b转换成strong,默认target设为"_blank"并保持href、target、align属性。在匹配组件及属性的名称时可以使用像*,+,?这样的通配符。<br>
|
||||
<br> <strong>字符:</strong><br>
|
||||
<table border="0" cellspacing="0" cellpadding="3">
|
||||
<tr>
|
||||
<td> , </td>
|
||||
<td>各组件定义之间的分隔符。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> / </td>
|
||||
<td>两个同义组件之间的分隔符。第一个组件是会被用来输出的那个(即第二个组件被第一个替换)。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> | </td>
|
||||
<td>各属性定义之间的分隔符。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> [ </td>
|
||||
<td>定义某组件的属性列表的开始符号。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> ] </td>
|
||||
<td>定义某组件的属性列表的结束符号。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> = </td>
|
||||
<td>将属性的默认值设为特定值。例如:"target=_blank"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> : </td>
|
||||
<td>将属性的值强行设为特定值。例如:"border:0"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> < </td>
|
||||
<td>校验某个属性的值。例如:"target<_blank?_self"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> ? </td>
|
||||
<td>属性校验值之间的分隔符,见上。 </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<strong>特殊变量:</strong><br>
|
||||
{$uid} - 产生一个唯一ID号。 例如:"p[id:{$uid}]".<br>
|
||||
<br>此选项的默认值是以下模式:<br> "a[href|target],strong/b[class],em/i[class],strike[class],u[class],p[class|align],ol,ul,li,br,<br>
|
||||
img[class|src|border=0|alt|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],<br>
|
||||
table[border=0|cellspacing|cellpadding|width|height|class|align],tr[rowspan],<br>
|
||||
td[colspan|rowspan|width|height],div[class|align],span[class|align],pre[class|align],<br>
|
||||
address[class|align],h1[class|align],h2[class|align],h3[class|align],<br>
|
||||
h4[class|align],h5[class|align],h6[class|align],hr".<br>
|
||||
<br>要包含所有组件及属性,请使用 *[*] ,这在使用invalid_elements选项时特别有用。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[extended_valid_elements]</strong></td>
|
||||
<td>向"valid_elements"列表末尾添加可用组件。此选项在你仅仅想往默认列表中增添部分组件时相当有用。<BR>
|
||||
格式与"valid_elements"一致。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[invalid_elements]</strong></td>
|
||||
<td>输出时需要排除在外的组件名称列表,以逗号分隔开。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[trim_span_elements]</strong></td>
|
||||
<td>True/False选项。如果设置为true,不需要的组件将被移除。默认值即为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[verify_css_classes]</strong></td>
|
||||
<td>True/False选项。如果设置为true,将会校验CSS的class属性。默认值即为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[verify_html]</strong></td>
|
||||
<td>True/False选项。代表着HTML内容是否需要校验。默认值为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[urlconvertor_callback]</strong></td>
|
||||
<td>当清理进程处理URL的时候调用的函数名。此函数必须遵从以下的格式:func(url, node, on_save) ,返回转换后的URL。此设置专为集成目的而设。参数url代表要转换的地址,node代表包含URL的那个节点,on_save是一个布尔值(在用户提交表单时为真)。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[preformatted]</strong></td>
|
||||
<td>True/False选项。如果设置为true,编辑器将把制表符(TAB)转换成缩进,除此外保持其他whitespace(空白字符、换行等)字符,就如同HTML标签中的PRE的效果。默认值为false。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[insertlink_callback]</strong></td>
|
||||
<td>当执行"insertlink"命令时调用的函数名。此函数获取选定链接的地址和目标,返回一个以"href", "target"和 "title"为collection名称的数组。当使用新窗口时,为了兼容Mozilla,会在window.opener(弹出窗口的母窗口,译者注)上调用tinyMCE.insertLink。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[insertimage_callback]</strong></td>
|
||||
<td>当执行"insertimage"命令时调用的函数名。此函数获取选定图像的url并返回一个以src和alt为collection名称的数组。当使用新窗口时,为了兼容Mozilla,会在window.opener上调用tinyMCE.insertImage。<BR>
|
||||
函数格式:insertimage(src, alt, border, hspace, vspace, width, height, align, title,
|
||||
onmouseover, onmouseout, action).</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[setupcontent_callback]</strong></td>
|
||||
<td>当编辑器初始化时调用的函数名。函数格式:setupContentCallback(editor_id, node),其中editor_id是编辑器的id,node是编辑器所在的body组件节点。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[save_callback]</strong></td>
|
||||
<td>当执行triggerSave(触发保存)命令被调用时调用的函数名。函数格式:save(id, content, node),如果有特定返回值,其值将会被加到HTML表单组件上。所以可以通过此函数来自定义用户转换逻辑。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[docs_language]</strong></td>
|
||||
<td>TinyMCE文档中使用的语言,这应该是像se,uk,us等诸如此类的FN代码,它被用来从"<theme>/docs/<lang>"目录中获取文档。
|
||||
该选项的默认值跟language选项一致。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[width]</strong></td>
|
||||
<td>编辑器的宽度,它默认的宽度是原先被替换的组件宽度。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[height]</strong></td>
|
||||
<td>编辑器的高度,它默认的高度是原先被替换的组件高度。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[content_css]</strong></td>
|
||||
<td>编辑窗口中要使用的CSS文件,其路径应该跟页面相关。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[popups_css]</strong></td>
|
||||
<td>像插入链接和图片时的弹出窗口中使用的CSS文件,其路径应该跟页面相关。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[editor_css]</strong></td>
|
||||
<td>编辑器使用的CSS文件,其路径应该跟页面相关。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[encoding]</strong></td>
|
||||
<td>编辑器的输出编码,此选项目前只能为"html"或者空。如果设置为"html",编辑器的输出将经过HTML编码处理。<BR>
|
||||
例如:<将会变成&lt;,依此类推。默认值是空。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[debug]</strong></td>
|
||||
<td>True/False选项。如果设置成true,像css文件路径等调试信息将会被显示。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[visual]</strong></td>
|
||||
<td>True/False选项。如果设置成true,当边框设置成0的时候,为达到更好的视觉效果在编辑器中表格会有虚线出现。<BR>
|
||||
默认值为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[visual_table_style]</strong></td>
|
||||
<td>用户可自定义表格的样式,默认值为:"border: 1px dashed #BBBBBB"。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[add_form_submit_trigger]</strong></td>
|
||||
<td>True/False选项。如果设置成true,将强制进行所有表单的"onsubmit"事件处理并引发保存。此选项默认值为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[add_unload_trigger]</strong></td>
|
||||
<td>True/False选项。如果设置成true,在"onunload"事件发生时,当前窗口会引发一个triggerSave调用。此triggerSave调用不会做任何清理工作,因为它是用来处理 前进/后退 按钮的。此选项默认值为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[force_br_newlines]</strong></td>
|
||||
<td>True/False选项。此选项强制编辑器将段落符号(P)替换成换行符(BR)。此选项默认值为false。(实验阶段)</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[force_p_newlines]</strong></td>
|
||||
<td>True/False选项。如果打开此选项,在按下回车键(Enter)时Mozilla/Firefox浏览器会生成段落符号(P),在按下Shift+Enter时会生成换行符(BR)。此选项默认为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[relative_urls]</strong></td>
|
||||
<td>True/False选项。如果设置成true,绝对路径将被转换成相对路径。默认值为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[remove_script_host]</strong></td>
|
||||
<td>True/False选项。在设置成true的情况下,如果URL中的主机名、端口号跟编辑器当前所在一致,它们会被移除。<BR>
|
||||
例如:编辑器所在站点为 http://www.somesite.com ,那么以下链接 http://www.somesite.com/somedir/somepage.html 将会被转换成 /somedir/somepage.html 。<BR>如果relative_urls被设置成false,此选项默认为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[focus_alert]</strong></td>
|
||||
<td>True/False选项。如果设置成true,编辑器在失去焦点的时候就会出现一个烦人的警告框。默认值为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[document_base_url]</strong></td>
|
||||
<td>在将绝对路径转换成相对路径的时候会用到此文档的URL。这个选项指定了编辑器当前的默认文档。<BR>
|
||||
注意如果此选项指定到一个域名,请添加协议前缀,并以斜杠结尾。例如:http://www.somehost.com/mydir/</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[custom_undo_redo]</strong></td>
|
||||
<td>True/False选项。此选项可以使 撤消/重做 功能更加完善。默认值为true。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[custom_undo_redo_levels]</strong></td>
|
||||
<td>自定义最多可撤消操作的次数,默认是无限制。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[custom_undo_redo_keyboard_shortcuts]</strong></td>
|
||||
<td>如果使用,编辑器可以使用Ctrl+Z和Ctrl+Y快捷键来实现撤消和重做。默认允许。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[fix_content_duplication]</strong></td>
|
||||
<td>True/False选项。此选项修正了MSIE中一个内容重复的bug。默认启用,但是为了兼容性也可以禁用(false)。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[directionality]</strong></td>
|
||||
<td>此选项可以设置像阿拉伯语等语言的文字方向。可能的值为:ltr, rtl。默认值: ltr(从左到右)。 </td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[auto_cleanup_word]</strong></td>
|
||||
<td>如果启用,从MS office/Word粘贴的HTML将会自动被清理。此选项默认值为false。<BR>
|
||||
注意:此操作当前仅支持MSIE。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[cleanup_on_startup]</strong></td>
|
||||
<td>如果启用,在编辑器初始化时文本域及组件将会被清理。默认值为false。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[inline_styles]</strong></td>
|
||||
<td>如果启用,像width,height,vspace,hspace和align等属性将会被风格属性替代。默认值为false。<BR>
|
||||
在使用此选项时记得要把风格属性应用在正确的组件上。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[convert_newlines_to_brs]</strong></td>
|
||||
<td>如果启用,所有的\n(新行)将会在编辑器启动时被转换成<br />组件。此选项默认值为false。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[auto_reset_designmode]</strong></td>
|
||||
<td>因为在调用style.display的none/block方法来显示/隐藏某个TinyMCE编辑器的时候有bug,设计模式需要被重置。此选项一旦启用,当编辑器聚焦时,将自动重置。默认值为false。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[entities]</strong></td>
|
||||
<td>一张以字符代码来查找名称的表,该表中元素是以逗号分隔开的实体列表。该列表以奇数项、偶数项区分,其中奇数项是被用来转换的字符代码,偶数项是代表那个字符代码的实体名称。例如:"8205,zwj,8206,lrm,8207,rlm,173,shy"。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[cleanup_callback]</strong></td>
|
||||
<td>自定义清理函数。此选项能让用户在默认的清理基础上有所扩展。此函数调用跟默认的调用是分开的,它并不替换默认的清理函数,而仅仅是扩展。点击 <a href="themes.htm#cleanup">插件清理</a> 查看更多细节。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#CCCCCC">
|
||||
<td colspan="2"><strong>主题的高级特定设置</strong></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_toolbar_location]</strong></td>
|
||||
<td>此选项用来改变工具栏的默认位置。可能的值为:"top"和"bottom"。默认值是"bottom"。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_toolbar_align]</strong></td>
|
||||
<td>此选项用来设置工具栏的对齐方式是left, center还是right。默认值是center。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_styles]</strong></td>
|
||||
<td>此选项可以用来增加风格下拉框中的CSS类和名称。格式如下:"<title>=<class>;.."。<BR>
|
||||
如果没有指定此选项,主内容部分的CSS类将会被自动导入。<br>
|
||||
例如:"Header 1=header1;Header 2=header2;Header 3=header3"</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_buttons1]</strong></td>
|
||||
<td>工具栏上第一行要包含的按钮列表,以逗号分隔开。例如:"bold,italic,underline"。<br>
|
||||
<br>
|
||||
允许的按钮名称如下:<br>
|
||||
bold, italic, underline, strikethrough, justifyleft, justifycenter, justifyright,
|
||||
justifyfull, styleselect, bullist, numlist, outdent, indent, undo,redo,
|
||||
link, unlink, image, cleanup, help, code, table, row_before, row_after,
|
||||
delete_row, separator, rowseparator, col_before, col_after, delete_col, hr, removeformat,
|
||||
sub, sup, formatselect, fontselect, fontsizeselect, forecolor,charmap,visualaid,spacer,cut,copy,paste</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_buttons2]</strong></td>
|
||||
<td>同上,差别在于指定的是工具栏第二行。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_buttons3]</strong></td>
|
||||
<td>同上,差别在于指定的是工具栏第三行。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_buttons<N>_add]</strong></td>
|
||||
<td>向工具栏上特定的第N行中增加额外的控制/按钮。例如:theme_advaned_buttons3_add : "iespell".</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_buttons<N>_add_before]</strong></td>
|
||||
<td>向工具栏上特定的第N行的默认按钮前面增加额外的控制/按钮。例如:theme_advaned_buttons3_add_before : "iespell"。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_disable]</strong></td>
|
||||
<td>要禁用的按钮/组件的列表,以逗号分隔。例如:"formatselect".</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_source_editor_width]</strong></td>
|
||||
<td>源文件编辑器窗口的宽度。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_source_editor_height]</strong></td>
|
||||
<td>源文件编辑器窗口的高度。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_path_location]</strong></td>
|
||||
<td>组件路径列表的位置,可能的值为:"top"或"bottom"。默认值为:"none" </td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>[theme_advanced_blockformats]</strong></td>
|
||||
<td>formatselect列表要屏蔽的格式列表,以逗号分隔开。默认值:p,address,pre,h1,h2,h3,h4,h5,h6。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
以下是一个较为复杂的初始化例子:<br>
|
||||
<br>
|
||||
<table border="0" cellspacing="3" cellpadding="2" class="sample">
|
||||
<tr>
|
||||
<td class="samplecontent"><!-- tinyMCE --><br> <script language="javascript"
|
||||
type="text/javascript" src="<font color="#990000">jscripts/tiny_mce/tiny_mce.js</font>"></script><br>
|
||||
<script language="javascript" type="text/javascript"><br>
|
||||
<font color="#000099">tinyMCE.init({<br>
|
||||
mode : "exact",<br>
|
||||
theme : "mytheme",<br>
|
||||
language : "se",<br>
|
||||
elements : "elm1,elm2"<br>
|
||||
});</font><br> </script><br> <!-- /tinyMCE --></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<a name="functions" id="functions"></a> <span class="subtitle"><strong>函数</strong></span><strong>
|
||||
(供高级使用)</strong><br>
|
||||
<br>
|
||||
TinyMCE有一个全局实例,它能提供一些可从页面调用的公用函数。<br>
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.triggerSave([skip_cleanup]);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>进行清除操作,并将编辑器内容移回到表单域中。tinyMCE通过向表单提交方法中增加触发器来自动调用此函数。<br>
|
||||
<br>
|
||||
<strong>参数:</strong><br>
|
||||
[skip_cleanup] - 禁用保存触发器的清除功能,默认为false。(可选)<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 无<br>
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.updateContent(form_element_name);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>将表单组件的内容转移到编辑器中,此操作的功能跟triggerSave()正好相反。当你想动态改变编辑器内容时可以使用此方法。<br>
|
||||
<br>
|
||||
<strong>参数:<br>
|
||||
</strong>form_element_name - 要获取内容的组件所在表单的名称。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 无
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.execInstanceCommand(editor_id, command, [user_interface], [value]);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法通过editor_id参数找到某个编辑器实例,在此编辑器上执行一个命令。<br>
|
||||
<br>
|
||||
<strong>参数:</strong><br>
|
||||
editor_id - 编辑器实例的ID或者被替换后的组件id/名称。<br>
|
||||
command - 要执行的命令。查看execCommand函数以获取更多细节。<br>
|
||||
[user_interface] - 是否使用用户界面。<br>
|
||||
[value] - 执行命令时要传递的参数,例如:一个URL。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 无
|
||||
<hr noshade>
|
||||
<strong><a name="execcommand"></a>语法:</strong> tinyMCE.execCommand(command, [user_interface], [value]);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法在选定编辑器中通过名称执行特定命令。<br>
|
||||
<br>
|
||||
<strong>参数:<br>
|
||||
</strong>command - 要执行的命令,例如:"Bold" or "Italic"。<a href="http://www.mozilla.org/editor/midas-spec.html" target="_blank">你可以通过此连接来查看Mozilla Midas spec</a>。但是tinyMCE也有自身一些特殊的命令如下表所示:<br>
|
||||
<br>
|
||||
<table cellpadding="3" cellspacing="1" bgcolor="#111111">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150"><strong>mceLink</strong></td>
|
||||
<td>打开插入链接对话框并插入链接。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150"><strong>mceImage</strong></td>
|
||||
<td>打开插入图像对话框并插入图像。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceCleanup</strong></td>
|
||||
<td>从HTML代码中移除不需要的组件和属性。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceHelp</strong></td>
|
||||
<td>打开文档页面。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceInsertTable</strong></td>
|
||||
<td>在鼠标位置插入表格,默认尺寸为:2×2。如果execCommand函数中有指定value参数,它的格式必须为name/value形式的数组,其中name有以下选项:cols, rows, border, cellspacing, cellpadding。border(边框)的默认大小为:0。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceTableInsertRowBefore</strong></td>
|
||||
<td>在当前鼠标所在位置之前插入一行。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceTableInsertRowAfter</strong></td>
|
||||
<td>在当前鼠标所在位置之后插入一行。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceTableDeleteRow</strong></td>
|
||||
<td>将当前鼠标所在行删除。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceTableInsertColBefore</strong></td>
|
||||
<td>在当前鼠标所在位置之前插入一列。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceTableInsertColAfter</strong></td>
|
||||
<td>在当前鼠标所在位置之后插入一列。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceTableDeleteCol</strong></td>
|
||||
<td>将当前鼠标所在列删除。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceAddControl</strong></td>
|
||||
<td>向编辑器添加组件控制,此编辑器的id/name由value指定。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceRemoveControl</strong></td>
|
||||
<td>通过editor_id名称来移除特定控制。value是要移除的editor_id(编辑器ID),编辑器ID格式如下:"mce_editor_<index>"。<BR>
|
||||
也可以使用DOM组件的ID和表单名。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceFocus</strong></td>
|
||||
<td>使以value的值为ID的编辑器获得焦点。编辑器ID格式如下:"mce_editor_<index>"。也可以使用DOM组件的ID和表单名。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceSetCSSClass</strong></td>
|
||||
<td>设置CSS类属性,或者在选择框中创建新的span。value的值是要给选定组件指派的css类名或者要新创建的span组件名称。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceInsertContent</strong></td>
|
||||
<td>在当前鼠标所在位置插入value的内容。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceReplaceContent</strong></td>
|
||||
<td>将当前选定部分替换为value中的HTML代码。{$selection}变量由当前选定部分的文字内容替换。</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceSetAttribute</strong></td>
|
||||
<td><p>为当前选定组件设置属性。此命令的value应该是name/value数组,其参数如下:<br>
|
||||
<br>
|
||||
<strong>name</strong> - 要设置的属性名。<br>
|
||||
<strong>value</strong> - 要设置的属性值。<br>
|
||||
<strong>[targets]</strong> - 要增加属性的目标组件,默认为:p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address。<br>
|
||||
<br>
|
||||
使用示例:<br>
|
||||
tinyMCE.execCommand('mceSetAttribute',false,{name:'align',value:'right'});</p></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceToggleVisualAid</strong></td>
|
||||
<td><p>是否开启视觉帮助模式</p></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceAnchor</strong></td>
|
||||
<td><p>插入名称锚点。value是锚点的名称。</p></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceResetDesignMode</strong></td>
|
||||
<td><p>重置所有编辑器实例的设计模式状态。在Firefox中,当编辑器被放在制表符中或者用style.display="none/block"来控制隐显的时候,此命令非常有用。在编辑器重新显示时调用此命令。</p></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceSelectNode</strong></td>
|
||||
<td><p>选定value指定的节点/组件。同时此命令会使编辑器滚动到此组件所在位置。</p></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><strong>mceSelectNodeDepth</strong></td>
|
||||
<td><p>从当前节点以深度关系选择指定的节点/组件。所以0值会选定当前聚焦的节点。同时此命令会使编辑器滚动到此组件所在位置。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
user_interface - 申明某命令是否会显示用户界面。True/False选项。<br>
|
||||
value - 要传递给命令的值。例如,插入链接时,它就是链接的URL。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 无<br>
|
||||
<br>
|
||||
<strong>示例:</strong><br>
|
||||
<table border="0" cellspacing="3" cellpadding="2" class="sample">
|
||||
<tr>
|
||||
<td class="samplecontent"><a href="<font color="#990000">javascript:tinymce.execCommand('Bold');</font>">[Do
|
||||
bold]</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.insertLink(href, target);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法在当前选定编辑器实例的鼠标位置插入一个链接,或者用新的数据来更新已有链接。当你创建自己的主题时,此方法应在插入链接的弹出窗口中的OK按钮按下时被调用。<br>
|
||||
<br>
|
||||
<strong>参数:<br>
|
||||
</strong>href - 链接的地址/URL。<br>
|
||||
target - 链接的目标。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 无
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.insertImage(src, alt, border, hspace, vspace,
|
||||
width, height, align, title, onmouseover, onmouseout);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法在当前选定编辑器实例的鼠标位置插入图像,或者用新的数据来更新已有图像。当你创建自己的主题时,此方法应在插入图像的弹出窗口中的OK按钮按下时被调用。<br>
|
||||
<br>
|
||||
<strong>参数:<br>
|
||||
</strong>src - 图像地址。<br>
|
||||
alt - 图片的替代文字。<br>
|
||||
border - 图像边框。<br>
|
||||
hspace - 图像水平间距。<br>
|
||||
vspace - 图像垂直间距。<br>
|
||||
width - 图像宽。<br>
|
||||
height - 图像高。<br>
|
||||
align - 图像对齐方式。<br>
|
||||
title - 图像链接的标题。<br>
|
||||
onmouseover - 图像在鼠标放上去时的事件处理。<br>
|
||||
onmouseout - 图像在鼠标移开时的事件处理。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 无
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.triggerNodeChange();<br>
|
||||
<br>
|
||||
<strong>描述:</strong>当编辑器发生外部变化时此方法被调用。然后此方法回调主题的"handleNodeChangeCallback"方法。<br>
|
||||
<br>
|
||||
<strong>参数: </strong>None<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 无
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.getContent();<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法返回当前选定编辑器中的HTML内容。如果没有任何选定编辑器,该方法返回null。<br>
|
||||
<br>
|
||||
<strong>参数: </strong>None<br>
|
||||
<br>
|
||||
<strong>返回:</strong>当前选定编辑器中的HTML内容或者null。
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.setContent(html);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法设定当前选定编辑器的HTML内容。<br>
|
||||
<br>
|
||||
<strong>参数:<br>
|
||||
</strong>html - 要设定的HTML源代码。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> None.
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.getEditorInstance(editor_id);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法通过editor_id返回某个编辑器实例。<br>
|
||||
<br>
|
||||
<strong>参数:<br>
|
||||
</strong>editor_id - 要获取的编辑器实例。<br>
|
||||
<br>
|
||||
<strong>返回:</strong>编辑器实例(TinyMCEControl)。
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.importThemeLanguagePack([theme]);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法导入主题中特定的语言包。自定义主题中可以调用此方法。<br>
|
||||
<br>
|
||||
<strong>参数:</strong><br>
|
||||
[theme] - 当前主题名称。此选项可选,默认为全局的"theme"设定。此参数在主题插件中非常有用。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> None.
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.importPluginLanguagePack(plugin, valid_languages);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法导入插件中特定的语言包。自定义插件中可以调用此方法。<br>
|
||||
<br>
|
||||
<strong>参数:</strong><br>
|
||||
plugin - 当前插件的名称。<br>
|
||||
valid_languages - 以逗号分隔的所支持语言包列表。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> None.
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.applyTemplate(html);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法替换主题中的设置及语言变量。<br>
|
||||
<br>
|
||||
<strong>参数:</strong>
|
||||
<br>
|
||||
html - 要替换主题变量的HTML代码。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 转换后的HTML代码。
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.openWindow(template, [args]);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法通过从指定的template参数中获取width, height及html数据来打开新窗口。数组参数args中包含要替换的变量名。<br>
|
||||
<br>
|
||||
还有一些自定义的窗口参数:<br>
|
||||
mce_replacevariables
|
||||
- 启用/禁用HTML文档中的语言/变量替换。默认启用。<br>
|
||||
mce_windowresize - 启用/禁用弹出窗口的自动resize特征,默认启用。<br>
|
||||
<br>
|
||||
<strong>参数:</strong> <br>
|
||||
template - Name/Value数组,以width, height, html和file为键。<br>
|
||||
[args] - 包含要替换变量名的Name/Value数组。模板文件中的键值变量被参数列表所替换。<BR>
|
||||
例如:image.php?src={$src}被替换为:image.php?src=image.gif。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> None.
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.getWindowArg(name, [default_value]);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法根据name返回窗口参数,它可以用在主题中的弹出窗口中,以获取对话框中的参数。<br>
|
||||
<br>
|
||||
<strong>参数:</strong> <br>
|
||||
name - 要获取的窗口参数的名称。<br>
|
||||
[default_value] - 窗口参数丢失时返回的默认值。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 窗口参数的值。
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.setWindowArg(name, value);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法根据name设定窗口参数,例如它在某插件调用其他插件时非常有用。<br>
|
||||
<br>
|
||||
<strong>参数:</strong> <br>
|
||||
name - 要设置的窗口参数。<br>
|
||||
value - 窗口参数中要设置的值。<br>
|
||||
<br>
|
||||
<strong>返回:</strong> 窗口参数值。
|
||||
<hr noshade>
|
||||
<strong>语法:</strong> tinyMCE.getParam(name, [default_value], [strip_whitespace]);<br>
|
||||
<br>
|
||||
<strong>描述:</strong>此方法返回TinyMCE的配置参数。<br>
|
||||
<br>
|
||||
<strong>参数:</strong> <br>
|
||||
name - 要获取的窗口参数名。<br>
|
||||
[default_value] - 窗口参数丢失时返回的默认值。<br>
|
||||
[strip_whitespace] - 如果为真,所有返回值中的空白字符将会被除去。默认:false。<br>
|
||||
<br>
|
||||
<strong>返回:</strong>TinyMCE配置参数。<br>
|
||||
<hr noshade>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
|
||||
<tr>
|
||||
<td>返回 <a href="index.htm">内容提要</a></td>
|
||||
<td align="right"><a href="#">顶部</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue