首页 > csdn导入, 技术 > FCKEdtior初步集成

FCKEdtior初步集成

我使用的是Javascript版本+Java的。主要用Javascript, Java的只是用来参考一下源代码。
1. 拷贝文件,主要是js包里的,根目录下fckeditor.js, fckconfig.js, fckstyles.js, fcktemplates.js以及editor目录拷贝到web应用下。拷贝到哪里与以后要设置的BasePath有关系。
2. 显示代码: 在页面里包含 fckeditor.js。然后写这一段:
<script type=”text/javascript”>
var oFCKeditor = new FCKeditor(’content’) ;
oFCKeditor.BasePath = “fckeditor/” ;
oFCKeditor.Height = 600;
oFCKeditor.ToolbarSet = “Default” ;
oFCKeditor.Value = ”;
oFCKeditor.Create();
</script>
最主要是BasePath的设置。比如你把fckeditor.js放在了http://localhost:8080/test/fckeditor/fckeditor.js,你的调用文件在http://localhost:8080/test下,你就把BasePath设成”fckeditro/”(后面要跟’/')
3. 上传文件的设置:
(1)修改fckconfig.js里的最后几部分,如LinkUploadURL, ImageUploadURL, FlashUploadURL,改成你上传文件的地址。不管那些什么Language了。
(2)修改editor/filemanager/browser/default/frmupload.html,把那个form的action改成上传的地址。这个不知道为什么,我是找了好久才找到的。
(3)编写upload servlet。参考Java包里的那个ConnectorServlet里的doPost()方法。 主要是返回值要设对。

  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Warning: fsockopen() has been disabled for security reasons in /home/onlymars/public_html/wp/wp-includes/class-snoopy.php on line 1142