关于fckeditor的问题
发布文章的时候用的fckedtor然后我发现修改的时候
先读出数据
$this->load->library('fckeditor', "content");
$this->fckeditor->Height = '400';
$this->fckeditor->ToolbarSet = 'Basic';
$this->fckeditor->Value = $content;
$data['fckeditor'] = $this->fckeditor->CreateHtml();
可是读出来的东西却不是原来的样式了,用PHPMYADMIN查看数据库中:
<div>
<div style="text-align: center>哈哈哈哈哈哈</div>
</div>
是这个样子的
修改的FCKEDITOR显示的和数据库中的一幕一样,我想得到的是原来的样子,这是怎么搞的
高手帮帮忙 $this->fckeditor->Value = $content;
这个地方有错吗 :L :Q :Q <div><ul> <li>fuck you</li> </ul></div>
修改之后我的数据库中的东西都变成了这个样子的了
晕 可是我却没有动它啊:( 我用js调用没出现你这种情况
添加:
<script type="text/javascript" src="<?=base_url()?>fck/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var fck = new FCKeditor( 'content' ) ;
fck.BasePath = "<?=base_url()?>/fck/" ;
fck.ReplaceTextarea() ;
}
</script>
<?=form_open('admin/news/newsadd')?>
</div><textarea id="content" name="content" cols="80" rows="10"></textarea><div>
修改:
<script type="text/javascript" src="<?=base_url()?>fck/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var fck = new FCKeditor( 'content' ) ;
fck.BasePath = "<?=base_url()?>/fck/" ;
fck.ReplaceTextarea() ;
}
</script>
<?=form_open("admin/news/news_modi/$news/$news")?>
<div>内容</div><div>
</div><textarea id="content" name="content" cols="80" rows="10"><?=$contents?></textarea><div> $data['fckeditor'] = $this->fckeditor->CreateHtml();
会不会是这个出了问题
不能这么写吗 屈服了,还是改用JS调用吧 用 JS 调用才是聪明人!!跨平台、没任何问题。
页:
[1]