主頁 > 知識庫 > fckeditor在php中的用法(添加于修改寫成了函數(shù))

fckeditor在php中的用法(添加于修改寫成了函數(shù))

熱門標簽:網(wǎng)站文章發(fā)布 服務器配置 呼叫中心市場需求 智能手機 美圖手機 銀行業(yè)務 檢查注冊表項 鐵路電話系統(tǒng)
復制代碼 代碼如下:

function CreateEditor ($act,$id,$url) { #調(diào)用FCKeditor并補完發(fā)表文章的表單,act=0:發(fā)表新文章 =1修改文章
include("editor/fckeditor.php"); //FCKeditor已存放到此目錄下
$oEditor = new FCKeditor ("content"); //對應于一個input控件,相當于是一個name=content的textarea
$oEditor -> BasePath = 'editor/'; //配置基本信息
$oEditor -> Width = "100%";
$oEditor -> Height = "400";
if( $act ) {
$query = "SELECT title,content FROM article WHERE id=$id";
$result = mysql_query($query);
$fillin = mysql_fetch_array($result);
}
echo 'form action="'.$url.'" method="post">';
echo 'p>Title: input type="text" class="text" class="text" name="title" size="100" value="'.$fillin['title'].'">/p>p>';
if( $act ) $oEditor -> Value = $fillin['content']; //若是修改文章,則將原文章內(nèi)容放進編輯器
$oEditor -> Create(); //創(chuàng)建編輯器
echo '/p>';
echo 'p>input type="submit" class="button" value="P o s t">/p>';
echo '/form>';
}



如果是編輯頁面:(直接把下面的放在文本區(qū)域就可以了)
復制代碼 代碼如下:

?php
include("../../../FCKeditor/fckeditor.php"); //FCKeditor已存放到此目錄下
$oEditor = new FCKeditor ("content"); //對應于一個input控件,相當于是一個name=content的textarea
$oEditor -> BasePath = '../../../FCKeditor/'; //配置基本信息
$oEditor -> Width = "100%";
$oEditor -> Height = "400";
$oEditor -> Value = $list['content']; //若是修改文章,則將原文章內(nèi)容放進編輯器
$oEditor -> Create(); //創(chuàng)建編輯器
?>

您可能感興趣的文章:
  • PHP中CKEditor和CKFinder配置問題小結(jié)
  • 針對PHP環(huán)境下Fckeditor編輯器上傳圖片配置詳細教程
  • 探討fckeditor在Php中的配置詳解
  • fckeditor編輯器在php中的配置方法
  • php下安裝配置fckeditor編輯器的方法
  • php下FCKeditor2.6.5網(wǎng)頁編輯器的使用方法
  • php ckeditor上傳圖片文件名亂碼解決方法
  • php fckeditor 調(diào)用的函數(shù)
  • 將FCKeditor導入PHP+SMARTY的實現(xiàn)方法
  • jQuery+PHP發(fā)布的內(nèi)容進行無刷新分頁(Fckeditor)
  • php版本CKEditor 4和CKFinder安裝及配置方法圖文教程

標簽:沈陽 紅河 新疆 上海 樂山 長治 滄州 河南

巨人網(wǎng)絡通訊聲明:本文標題《fckeditor在php中的用法(添加于修改寫成了函數(shù))》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266