首页 > 开发 > PHP > 正文

php 中调用fckeditor网页编辑器方法

2024-05-04 21:56:24
字体:
来源:转载
供稿:网友

下面中要在html 中调用就行了

  1. <script src=”fckeditor/fckeditor.js”></script>  
  2. <script type=”text/网页特效”>  
  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.getelementbyidx(”btnshow”).disabled = ‘true';  
  12. document.getelementbyidx(”btnshow”).style.display = ‘none';  
  13. }  
  14. </script>  
  15. <textarea name=”content”></textarea>  
  16. <input id=btnshow style=”display:inline” type=button onclick=”showfck()”> 

今天我们要讲了是关于php如何调用代码如:

  1. <? 
  2. include("../editor/fckeditor.php"); 
  3. $ofckeditor = new fckeditor('fckeditor1') ;  
  4. $ofckeditor->basepath = '../editor/';  
  5. $ofckeditor->value = '';  
  6. $ofckeditor->width = '100%' ;  
  7. $ofckeditor->height = '360' ;  
  8. $ofckeditor->create() ; 
  9. ?> 

如果php要获取值就直接 $_post['fckeditor1']; 就可以了。

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表