Fckeditor是一种非常流行的所见即所得的网页编辑器。它可和PHP、JavaScript、ASP、ASP.NET、ColdFusion、Java、以及ABAP等不同的编程语言相结合。本文讲述fckeditor在ASP,PHP和JS的调用方法:
  PHP调用方法:
 
  
  1. <?php  
  2. include('../fckeditor/fckeditor.php') ;  //把文件包含进来
  3. $oFCKeditor = new FCKeditor('content') ;  //表单项的名称
  4. $oFCKeditor->BasePath="../fckeditor/";  //编辑器所在目录
  5. $oFCKeditor->ToolbarSet="Yiyunnet";  //工具栏的名字
  6. $oFCKeditor->Height='350px';  //高度
  7. $oFCKeditor->Width='630px';  //宽度
  8. $oFCKeditor->Value="";  //初始值
  9. $myeditor=$oFCKeditor->CreateHtml();  //在要显示编缉器的地方输出变量$myeditor的值就行了
  10. ?>

ASP调用方法:
 
  
  1. <!-- #INCLUDE file="../FCKeditor/FCKeditor.asp" -->
  2. <%  
  3. Dim oFCKeditor  
  4. Set oFCKeditor = New FCKeditor  
  5. oFCKeditor.BasePath = "../FCKeditor/"
  6. oFCKeditor.ToolbarSet = "Yiyunnet"
  7. oFCKeditor.Width = "100%"
  8. oFCKeditor.Height = "300"
  9. oFCKeditor.Value = ""
  10. oFCKeditor.Create "Content"   'Content是表单项的名称,这里直接显示编辑器  
  11. %>

  FCKeditor js调用方法①
 
  
  1. <script src="fckeditor/fckeditor.js"></script>  
  2. <script type="text/javascript">  
  3. var oFCKeditor = new FCKeditor( 'Content' ) ;  
  4. oFCKeditor.BasePath = 'fckeditor/' ;  
  5. oFCKeditor.ToolbarSet = 'Basic' ;  
  6. oFCKeditor.Width = '100%' ;  
  7. oFCKeditor.Height = '400' ;  
  8. oFCKeditor.Value = '' ;  
  9. oFCKeditor.Create() ;  
  10. </script>
  FCKeditor js调用方法②
 
  
  1. <script src="fckeditor/fckeditor.js"></script>  
  2. <script type="text/javascript">  
  3. function showFCK(){  
  4. var oFCKeditor = new FCKeditor('Content') ;  
  5. oFCKeditor.BasePath = 'fckeditor/' ;  
  6. oFCKeditor.ToolbarSet = 'Basic' ;  
  7. oFCKeditor.Width = '100%' ;  
  8. oFCKeditor.Height = '200' ;  
  9. oFCKeditor.Value = '' ;  
  10. oFCKeditor.ReplaceTextarea() ;  
  11. document.getElementById("btnShow").disabled = 'true';  
  12. document.getElementById("btnShow").style.display = 'none';  
  13. }  
  14. </script>  
  15. <textarea name="Content"></textarea>  
  16. <input id=btnShow style="display:inline" type=button οnclick="showFCK()">