关于我在ZF中使用FckEditor的方法
来源:互联网 发布:泳衣面料 知乎 编辑:程序博客网 时间:2024/04/29 11:09
目录放置在
index.php
---js
---fckeditor
控制器中写入以下内容
public function AddAction()
{
Zend_Loader::loadFile('fckeditor_php5.php','./js/fckeditor');
$sBasePath = WWWROOT.'js/fckeditor/';
$oFCKeditor = new FCKeditor('FCKeditor') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor-> Height = 450 ;
//通过create方法,返回html内容,不是echo
$this -> view -> fckeditor = $oFCKeditor->Create();
}
还得修改fckeditor目录下的fckeditor_php5.php中的代码
fckeditor类中
function Create()
{
echo $this->CreateHtml() ;
}
修改成以下
function Create()
{
return $this->CreateHtml() ;
}
再通过视图输入
<?php echo $this -> fckeditor; ?>
要取得编辑器中的内容JS是
var ōEditor = FCKeditorAPI.GetInstance('FCKeditor');
var content = oEditor.GetHTML()
content就是编辑器中的内容
还有就是在fckeditor目录下放一人.htaccess文件。关闭重写引擎
RewriteEngine Off
index.php
---js
---fckeditor
控制器中写入以下内容
public function AddAction()
{
Zend_Loader::loadFile('fckeditor_php5.php','./js/fckeditor');
$sBasePath = WWWROOT.'js/fckeditor/';
$oFCKeditor = new FCKeditor('FCKeditor') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor-> Height = 450 ;
//通过create方法,返回html内容,不是echo
$this -> view -> fckeditor = $oFCKeditor->Create();
}
还得修改fckeditor目录下的fckeditor_php5.php中的代码
fckeditor类中
function Create()
{
echo $this->CreateHtml() ;
}
修改成以下
function Create()
{
return $this->CreateHtml() ;
}
再通过视图输入
<?php echo $this -> fckeditor; ?>
要取得编辑器中的内容JS是
var ōEditor = FCKeditorAPI.GetInstance('FCKeditor');
var content = oEditor.GetHTML()
content就是编辑器中的内容
还有就是在fckeditor目录下放一人.htaccess文件。关闭重写引擎
RewriteEngine Off
- 关于我在ZF中使用FckEditor的方法
- FCKeditor在JSP中使用的配置方法
- 在ASP.NET中使用FCKeditor的方法
- FCKeditor在JSP中使用的配置方法
- 在PHP中使用功能强大的FCKeditor
- asp.net中使用FCKeditor的方法
- zf中Zend_Db_Table的find()方法
- zf中Zend_Db_Table_Row的save()方法 更新
- 我眼中的ZF
- 我眼中的ZF
- ZF 引用 FCKeditor 的 一次经验
- 在ASP.NET中使用FCKEditor的简单配置方法图解
- 在ASP.NET中使用FCKEditor的简单配置方法图解
- 在JSP中使用FCKeditor
- 在Smarty中使用FCKeditor
- 关于在Winform中设置,获取fckeditor 的值
- 在Fckeditor中上传.exe文件的设置方法
- ZF 资料库的使用
- (原创)哈夫曼树(2)
- 按回车提交问题: http://www.cnblogs.com/hfyb/archive/2007/01/21/626135.html
- PHP--session 常见问题解决
- oracle 中 dblink 的创建方法
- ACCESS数据库连接类设计
- 关于我在ZF中使用FckEditor的方法
- 字节对齐
- 什么是网站PV值?
- 总结一下维护了一年的一个软件系统的软件体系(五)
- VS.NET安装部署深入研究
- jsp连接数据库大全
- 压缩文件格式介绍zip, rar, gz, tar.gz, tgz, bz2, Z, tar等
- Linux 汇编语言开发指南
- 开发大型高负载类网站应用的几个要点