fckeditor php 에서 의 용법(수정 함수 로 추가)

1302 단어 fckeditorphp
4.567913.편집 페이지 라면(아래 것 을 텍스트 영역 에 직접 놓 으 면 됩 니 다)
 
function CreateEditor ($act,$id,$url) { # FCKeditor ,act=0: =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']; // ,
$oEditor -> Create(); //
echo '</p>';
echo '<p><input type="submit" class="button" value="P o s t"></p>';
echo '</form>';
}

좋은 웹페이지 즐겨찾기