您的位置:

php调用fckeditor,pHp调用html的function函数调用

本文目录一览:

php 中的FCKeditor,我想在FCKeditor文件夹外面调用fckeditor,怎么配置?

先要在你想调用编辑器的文件中引用:include "fckeditor/fckeditor.php";

然后在你想放编辑器的地方写上:

?php

$oFCKeditor = new FCKeditor('content') ;

$oFCKeditor-BasePath = 'fckeditor/' ;

$oFCKeditor-ToolbarSet = 'Default' ;

$oFCKeditor-InstanceName = 'content' ;

$oFCKeditor-Width = '100%' ;

$oFCKeditor-Height = '400' ;

$oFCKeditor-Value = '';

$oFCKeditor-Create() ;

?

FCKeditor在php是怎么用的啊

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 'pTitle: input type="text" class="text" class="text" name="title" size="100" value="'.$fillin['title'].'"/pp';

if( $act ) $oEditor - Value = $fillin['content']; //若是修改文章,则将原文章内容放进编辑器

$oEditor - Create(); //创建编辑器

echo '/p';

echo 'pinput type="submit" class="button" value="P o s t"/p';

echo '/form';

}

PHP 使用fckeditor

script src="../../fckeditor2/fckeditor.js"/script

script type="text/javascript"

var oFCKeditor = new FCKeditor( 'detail' ) ;

oFCKeditor.BasePath = '../../fckeditor2/' ;

oFCKeditor.ToolbarSet = 'Default' ;

oFCKeditor.Width = '100%' ;

oFCKeditor.Height = '250px' ;

oFCKeditor.Value = '{--$arr.detail--}' ;

oFCKeditor.Create() ;

/script

{--$arr.detail--} 是你读取的字段已默认显示,自己修改

PHP怎样使用FCKeditor ?

这个也好简单的,调用FCK有固定的格式,那里面也有配置,不难的