那天没中文,不好意思。多谢hex的翻译。
那天没中文,不好意思。多谢hex的翻译。请问版主,你用的是哪个版本的fckeditor?
我这个版本的好象跟你的不一样,配置过程中第三步,没有的,能否把你的fckeditor放到共享里,10736061 原帖由 lony 于 2008-3-18 17:34 发表 http://codeigniter.org.cn/forums/images/common/back.gif提问:
$this->load->library('fckeditor', 'content');
这样的话,如何在一页里显示多个FCK? $this->load->library('fckeditor', 'fckeditor1');
$this->fckeditor->BasePath = 'system/plugins/FCKeditor/';
$this->fckeditor->ToolbarSet = 'Basic';
$data['fck1'] = $this->fckeditor->CreateHtml();
$this->fckeditor->InstanceName = 'fckeditor2';
$data['fck2'] = $this->fckeditor->CreateHtml();
$this->load->view('mypage', $data);
[ 本帖最后由 sam 于 2008-10-16 18:03 编辑 ] :handshake :handshake :handshake 4. 打开 ./plugins/fckeditor (或者你自己选择的目录)下的 fckeditor.php,复制 FCKeditor_IsCompatibleBrowser() 里的 所有内容,拷贝替换到 ./system/application/libraries/fckeditor.php 里的 IsCompatible()。
这一步时什么意思呢?请您给仔细的说一下了,谢谢了!!! 还有一个页面怎样生成多个编辑器呢??? 这个是要顶的,谢谢楼主:lol 我也献一小计,分享我的调用方法:
models下新建文件"o_editor.php"
内容为下:
---------------------------------------------------
<?phpif ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* @author yhui
*
*/
class O_editor extends Model
{
function O_editor()
{
parent::Model();
}
/**
* fckeditor
*
* @param $name: 名称
* @param $value: 初始内容
* @param $toolbar: Basic,Default
* @return object
*/
function fckeditor($name, $value='', $toolbar='Default')
{
$editer_dir = 'lib/fckeditor/'; //此处表示index.php同级目录下的lib文件夹下再有"fckeditor"文件夹,当然你也可以设置你自己喜欢的路径
include $editer_dir.'fckeditor.php'; //".php"不建议替换为“EXT”
$sBasePath = $editer_dir;
$oFCKeditor = new FCKeditor($name);
$oFCKeditor->BasePath = $editer_dir;
$oFCKeditor->ToolbarSet = $toolbar; //Basic,Default
$oFCKeditor->Value = $value;
$oFCKeditor->Height = 460;
$oFCKeditor->Width = "100%";
return $oFCKeditor;
}
}
?>
---------------------------------------------------
调用方法:
---------------------------------------------------
$this->load->model('o_editor');
$data['editor1'] = $this->o_editor->fckeditor('content1');
$data['editor2'] = $this->o_editor->fckeditor('content2');
$data['editor3'] = $this->o_editor->fckeditor('content3');
---------------------------------------------------
VIEW页:
---------------------------------------------------
$editor1->Height = 320;
echo $editor1->Create();
$editor2->Height = 320;
echo $editor2->Create();
$editor3->Height = 320;
echo $editor3->Create();
--------------------------------------------------- 楼上的方法好像更简单…… 。 感谢各位的分享!!!!!!!!! N次试验失败