CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
IBM Rational 系统开发最佳实践工具包 WebSphere MQ 最佳实践 TOP 15
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  PHP

FCKeditor 在Smarty中怎么用 100分

楼主wind840619(疯儿)2006-03-05 11:59:44 在 Web 开发 / PHP 提问

include   "FCKeditor/fckeditor.php"   ;  
  $sBasePath   =   $_SERVER['PHP_SELF']   ;  
  $sBasePath   =   substr($sBasePath,   0,   strpos($sBasePath,   "art_show.php"));  
  $oFCKeditor   =   new   FCKeditor('FCKeditor1');  
  $oFCKeditor->Config['SkinPath']=   $sBasePath   .   'FCKeditor/editor/skins/silver/'   ;  
  $oFCKeditor->BasePath   =   $sBasePath   ;  
  $oFCKeditor->Value   =   ''   ;  
  $oFCKeditor->Create();  
  是php代码来的   肯定是放在php文件里  
  但怎么把编辑器引进模板哪里阿  
  没人遇到过这样的情况么  
  请问  
  问题点数:100、回复次数:9Top

1 楼gu1dai(异域苍穹.百年飞行)回复于 2006-03-05 14:38:07 得分 0

首先,你了解smarty吗?它有手册。Top

2 楼wind840619(疯儿)回复于 2006-03-05 14:57:57 得分 0

我会用   请教Top

3 楼wind840619(疯儿)回复于 2006-03-05 18:30:21 得分 0

唉Top

4 楼mrshelly(Shelly)回复于 2006-03-05 18:34:41 得分 0

FCKEditor   版本多少?  
  你有仔细看过FCKEditor提供的范例吗?Top

5 楼mrshelly(Shelly)回复于 2006-03-05 18:42:35 得分 40

建议你看看   HTML   的调用方法,就不难用其它任何WEB编程语言做出调用了。Top

6 楼hsboy(PHP it!)回复于 2006-03-05 18:44:07 得分 60

假设  
  1、你要用fckeditor编辑的内容通过$smarty->assign('content',   $content)传递到模板  
  2、fckeditor编辑器放在当前被调用的php程序所在目录(注意不是模板文件所在的目录)的fckeditor目录下  
   
  则模板只需这样写即可:  
  ____________________________________________________________________________  
  <script   type="text/javascript"   src="fckeditor/fckeditor.js"></script>  
   
  <form   method="POST">  
  <script   type="text/javascript">  
   
  var   oFCKeditor   =   new   FCKeditor(   'content'   )   ;  
  oFCKeditor.BasePath   =   "fckeditor/"   ;  
  oFCKeditor.Height =   300   ;  
  oFCKeditor.Value =   '{   $content   }'   ;  
  oFCKeditor.Create()   ;  
  </script>  
  </form>  
  __________________________________________________________________________  
  自己仔细研究一下很容易解决你这个问题的。这并不是一个很困难的任务。其实这里很多都是菜鸟级别的。Top

7 楼helloyou0(你好!)回复于 2006-03-06 09:09:40 得分 0

嘿嘿Top

8 楼wind840619(疯儿)回复于 2006-03-06 14:28:25 得分 0

to  
  hsboy(PHP   it!)    
  mrshelly(Shelly)  
  明白  
  真笨  
  只会在php上想Top

9 楼shanfang()回复于 2006-03-26 09:45:05 得分 0

http://wiki.fckeditor.net/Developer%27s_Guide/Integration/PHP中的If   you   want   to   retrieve   the   resulting   HTML   instead   of   outputting   it   directly   to   the   browser   (for   example   if   you're   using   it   in   a   template   engine   such   as   Smarty),   you   can   call   the   "CreateHtml"   method   instead:    
   
  $output   =   $oFCKeditor->CreateHtml()   ;Top

相关问题

  • FCKeditor 在ASP.NET中怎么用??
  • smarty中怎么调用PHP函数
  • 用Smarty处理模板时图片应该怎么处理呢?
  • 奇怪,smarty的cache怎么不起作用?
  • FCKeditor谁用过?
  • fckeditor使用问题!!?
  • 我在新闻提交页面中用FCKeditor编辑器,但在用css不知怎么控制FCKeditor编辑器不会跑页面顶上?
  • 使用FCKEditor编辑器的时候,总现在FCKConfig.CustomConfigurationsPath.Length 为空或不是对象是怎么回事啊?
  • 求fckeditor,JAVA版使用者
  • 求fckeditor,JAVA版使用者

关键词

  • 模板
  • php
  • fckeditor
  • sbasepath
  • ofckeditor
  • smarty
  • 调用
  • 目录

得分解答快速导航

  • 帖主:wind840619
  • mrshelly
  • hsboy

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo