最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

php在頁面中調用fckeditor編輯器的方法

 更新時間:2011年06月10日 00:19:47   作者:  
fckeditor編輯器的代碼可以寫成一個函數(shù)或者類別,直接調用,不用每次都要寫那么多代碼!
剛才在論壇上看到一個童鞋分享的方法,感覺不是很全面,現(xiàn)在分享下我的!
復制代碼 代碼如下:

PHP頁面:
/* 編輯器 */
include_once "../include/fckeditor/fckeditor.php";//把編輯器引進來
$editor = new FCKeditor('content');//表單項的名稱
$editor->BasePath = "/fckeditor/";//編輯器所在目錄
$editor->ToolbarSet = "Normal";//工具欄的名字,可以根據(jù)自己的需求加載其他的
$editor->Width = "95%";//寬度度
$editor->Height = "250";//高度
$editor->Value = $content;//初始值
$fckeditor = $editor->CreateHtml();//在要顯示編緝器的地方輸出變量$fckeditor的值就行了
$tpl->assign('fckeditor', $fckeditor);//模板賦值

HTML模板頁面(我用的是smarty)
{%$fckeditor%}

一般php頁面調用
content 是我定義的變量名
$content =$_POST["content"];
添加:
<INPUT name="content" id="content" type=hidden>
<IFRAME id="content" src="fckeditor/editor/fckeditor.html?InstanceName=content&Toolbar=Normal" frameBorder=0 width=100% scrolling=no height=300 ></IFRAME>
修改頁面:
<INPUT name="content" id="content" type=hidden value="<?php echo $rows['content'];?>">
<IFRAME id="content" src="/fckeditor/editor/fckeditor.html?InstanceName=content&Toolbar=Normal" frameBorder=0 width=100% scrolling=no height=300 >
</IFRAME>

相關文章

最新評論

西乌| 祁阳县| 东港市| 浪卡子县| 乐山市| 阿城市| 延安市| 玉门市| 武隆县| 临清市| 平安县| 阿城市| 安溪县| 旺苍县| 梅河口市| 重庆市| 隆昌县| 上饶县| 水城县| 秦安县| 定兴县| 安吉县| 湘潭县| 咸丰县| 政和县| 福安市| 库伦旗| 滕州市| 仪征市| 康保县| 丘北县| 酒泉市| 青铜峡市| 内黄县| 霍州市| 宝应县| 军事| 江都市| 裕民县| 瓮安县| 溧水县|