May
24
1、FCKeditor最新版下载地址:http://www.fckeditor.net/。本文使用的版本是2.3beta
2、下载后解压到根目录,也就是使fckconfig.js处于/FCKeditor/目录下。当然也可以放到其他地方,不过后面的设置得做相应的修改。
3、如果觉得有必要可以删除其中的原代码和demo部分,以节省空间。可以删除的部分有:
4、editordef.php的代码如下:
说明:在fckconfig.js中可以自定义工具栏,oFCKeditor.ToolbarSet = "DDRR"可以选用工具栏,去掉这一句则使用默认工具栏,包含全部功能。也可以自己定义或者选择其他的^_^这个是我用的
5、下面设置fckconfig.js
a、设置默认语言
b、在编辑区域启用tab键,设为0则禁用
c、添加字体。注意,省略号是我刚刚该的,文件中请保持原样,把该加的加上就可以了。当然,不想要的也可以去掉。
d、设置上传和文件查看部分使用的语言(前面提到过的,不用的语言的代码可以删除),这里设为php
6、设置editor\filemanager\upload\php\config.php开启上传
7、设置editor\filemanager\browser\default\connectors\php\config.php开启连接。这个应该和FCKeditor的文件管理有关
这里只是简要介绍了一下,要有很多的设置需要大家自己研究。不当之处欢迎指正交流^_^
点击下载
2、下载后解压到根目录,也就是使fckconfig.js处于/FCKeditor/目录下。当然也可以放到其他地方,不过后面的设置得做相应的修改。
3、如果觉得有必要可以删除其中的原代码和demo部分,以节省空间。可以删除的部分有:
a、_samples文件夹
b、_testcases文件夹
c、editor目录下的_source文件夹
d、editor\lang目录下是语言包,可以只留下en.js, zh.js, zh-cn.js
e、skins目录下也可以删除你不想使用的皮肤
f、editor\filemanager\browser\default\connectors目录下可以考虑删除不需要的语种(fckeditor.js中可以设置使用什么语言)
g、editor\filemanager\upload目录下可以考虑删除不需要的语种(fckeditor.js中可以设置使用什么语言)
h、如果是使用fckeditor.js,那么FCKeditor目录下的其他后缀的fckeditor也可以删除
b、_testcases文件夹
c、editor目录下的_source文件夹
d、editor\lang目录下是语言包,可以只留下en.js, zh.js, zh-cn.js
e、skins目录下也可以删除你不想使用的皮肤
f、editor\filemanager\browser\default\connectors目录下可以考虑删除不需要的语种(fckeditor.js中可以设置使用什么语言)
g、editor\filemanager\upload目录下可以考虑删除不需要的语种(fckeditor.js中可以设置使用什么语言)
h、如果是使用fckeditor.js,那么FCKeditor目录下的其他后缀的fckeditor也可以删除
4、editordef.php的代码如下:
<?PHP
$editorjs=<<<eot
<script language="javascript" type="text/javascript" src="/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content' ) ;
oFCKeditor.ToolbarSet = "DDRR";
oFCKeditor.Height = "400";
oFCKeditor.Width = "100%" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
eot;
$editorbody=<<<eot
<textarea name="content" id="content" rows='20' cols='100' style='font-size: 10pt;'>{content}</textarea>
<li>{$lna[743]}</li>
<li>{$lna[744]}</li></ul>
eot;
$editorjs=<<<eot
<script language="javascript" type="text/javascript" src="/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content' ) ;
oFCKeditor.ToolbarSet = "DDRR";
oFCKeditor.Height = "400";
oFCKeditor.Width = "100%" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
eot;
$editorbody=<<<eot
<textarea name="content" id="content" rows='20' cols='100' style='font-size: 10pt;'>{content}</textarea>
<li>{$lna[743]}</li>
<li>{$lna[744]}</li></ul>
eot;
说明:在fckconfig.js中可以自定义工具栏,oFCKeditor.ToolbarSet = "DDRR"可以选用工具栏,去掉这一句则使用默认工具栏,包含全部功能。也可以自己定义或者选择其他的^_^这个是我用的
5、下面设置fckconfig.js
a、设置默认语言
FCKConfig.DefaultLanguage = 'zh-cn' ;
b、在编辑区域启用tab键,设为0则禁用
FCKConfig.TabSpaces = 1 ;
c、添加字体。注意,省略号是我刚刚该的,文件中请保持原样,把该加的加上就可以了。当然,不想要的也可以去掉。
FCKConfig.FontNames = '宋体;黑体;隶书;楷体_GB2312;Arial........
d、设置上传和文件查看部分使用的语言(前面提到过的,不用的语言的代码可以删除),这里设为php
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
6、设置editor\filemanager\upload\php\config.php开启上传
// SECURITY: You must explicitelly enable this "uploader".
$Config['Enabled'] = true ;
$Config['Enabled'] = true ;
7、设置editor\filemanager\browser\default\connectors\php\config.php开启连接。这个应该和FCKeditor的文件管理有关
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;
$Config['Enabled'] = true ;
这里只是简要介绍了一下,要有很多的设置需要大家自己研究。不当之处欢迎指正交流^_^
aa
2008-8-20 16:25























shiliu
2006-5-25 16:54
已经修改了。谢谢提醒!
xx
2006-5-25 15:44
附件里面的editor文件夹为空,请检查
分页: 1/1
1
1
MSDN
写写玩









