由于admin/editor/fckeditor_php5.php中
复制内容到剪贴板
代码:
        public function __construct( $instanceName )
{
        $this->InstanceName = $instanceName ;
        $this->BasePath = '/editor/' ;
      $this->Width = '100%' ;
      $this->Height = '350' ;
      $this->ToolbarSet = 'Default' ;
      $this->Value = '' ;
      $this->Config = array() ;
}导致每次FCKEDITOR初始化时便会将$BasePath设置为/editot/
因此admin/editor.php中:
复制内容到剪贴板
代码:
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = dirname($sBasePath).'/editor/';
$oFCKeditor->BasePath   = $sBasePath ;
//设置描述区域
$oFCKeditor = new FCKeditor('description');
$oFCKeditor->Value = $article['description'];
$oFCKeditor->Height = '200';
$oFCKeditor->ToolbarSet = 'Basic';
//描述区域的模板变量
$descriptionarea = $oFCKeditor->CreateHtml();第3行的设置无效~~~~
将第3行移至每个 new FCKeditor(''); 与 $oFCKeditor->CreateHtml();之间即可。
即是:
复制内容到剪贴板
代码:
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = dirname($sBasePath).'/editor/';
//设置描述区域
$oFCKeditor = new FCKeditor('description');
$oFCKeditor->Value = $article['description'];
$oFCKeditor->Height = '200';
$oFCKeditor->ToolbarSet = 'Basic';
//描述区域的模板变量
$oFCKeditor->BasePath   = $sBasePath ;
$descriptionarea = $oFCKeditor->CreateHtml();
//设置内容区域
$oFCKeditor = new FCKeditor('content');
$oFCKeditor->Value = $article['content'];
//内容区域的模板变量
$oFCKeditor->BasePath   = $sBasePath ;
$contentarea = $oFCKeditor->CreateHtml();[
本帖最后由 nbxx 于 2008-7-29 15:43 编辑 ]