php下安裝配置fckeditor編輯器的方法
更新時間:2011年03月02日 23:39:59 作者:
以下是我學(xué)習(xí)PHP時,總結(jié)一些安裝配置fckeditor在線編輯器最實(shí)用的方法。其實(shí)調(diào)用fckeditor也只有兩種調(diào)用方法。有什么大家可以在我博客上留言,我有時間會幫大家解答的。
一、PHP調(diào)用fckeditor方法。
二、JS調(diào)用fckeditor方法。
<?php
require_once(PATH_PRE.”fckeditor.php”); // 包含fckeditor類,
$oFCKeditor = new FCKeditor('content') ; //創(chuàng)建一個fckeditor對象,表單的名稱為content
$oFCKeditor->BasePath=”../fckeditor/”; //編輯器所在目錄
$oFCKeditor->ToolbarSet=”Yiyunnet”; // 默認(rèn)編輯器工具欄有Basic(基本工具) Default(所有工具)Soft(分一欄可以插入圖片視頻 ) Renpeng (可以上傳圖片視頻分為兩欄 ) Full (三欄)
$oFCKeditor->Height='100%'; //高度
$oFCKeditor->Width='100%'; //寬度
$oFCKeditor->Value=”"; //初始值 還可設(shè)置以下部分(”=”包含部分),并非必須:
$oFCKeditor->Config['SkinPath'] = ‘../editor/skins/silver/'; // 設(shè)置編輯器皮膚共有三種皮膚default
$oFCKeditor->Create(); //在要顯示編緝器的地方輸出變量$myeditor的值就行了
?>
FCKeditor js調(diào)用方法一
<script src=”fckeditor/fckeditor.js”></script>
<script type=”text/javascript”>
var oFCKeditor = new FCKeditor( ‘Content' ) ;
oFCKeditor.BasePath = ‘fckeditor/' ;
oFCKeditor.ToolbarSet = ‘Basic' ;
oFCKeditor.Width = ‘100%' ;
oFCKeditor.Height = ‘400′ ;
oFCKeditor.Value = ” ;
oFCKeditor.Create() ;
</script>
FCKeditor js調(diào)用方法二
<script src=”fckeditor/fckeditor.js”></script>
<script type=”text/javascript”>
function showFCK(){
var oFCKeditor = new FCKeditor('Content') ;
oFCKeditor.BasePath = ‘fckeditor/' ;
oFCKeditor.ToolbarSet = ‘Basic' ;
oFCKeditor.Width = ‘100%' ;
oFCKeditor.Height = ‘200′ ;
oFCKeditor.Value = ” ;
oFCKeditor.ReplaceTextarea() ;
document.getElementByIdx(”btnShow”).disabled = ‘true';
document.getElementByIdx(”btnShow”).style.display = ‘none';
}
</script>
<textarea name=”Content”></textarea>
<input id=btnShow style=”display:inline” type=button onclick=”showFCK()”>
二、JS調(diào)用fckeditor方法。
復(fù)制代碼 代碼如下:
<?php
require_once(PATH_PRE.”fckeditor.php”); // 包含fckeditor類,
$oFCKeditor = new FCKeditor('content') ; //創(chuàng)建一個fckeditor對象,表單的名稱為content
$oFCKeditor->BasePath=”../fckeditor/”; //編輯器所在目錄
$oFCKeditor->ToolbarSet=”Yiyunnet”; // 默認(rèn)編輯器工具欄有Basic(基本工具) Default(所有工具)Soft(分一欄可以插入圖片視頻 ) Renpeng (可以上傳圖片視頻分為兩欄 ) Full (三欄)
$oFCKeditor->Height='100%'; //高度
$oFCKeditor->Width='100%'; //寬度
$oFCKeditor->Value=”"; //初始值 還可設(shè)置以下部分(”=”包含部分),并非必須:
$oFCKeditor->Config['SkinPath'] = ‘../editor/skins/silver/'; // 設(shè)置編輯器皮膚共有三種皮膚default
$oFCKeditor->Create(); //在要顯示編緝器的地方輸出變量$myeditor的值就行了
?>
FCKeditor js調(diào)用方法一
復(fù)制代碼 代碼如下:
<script src=”fckeditor/fckeditor.js”></script>
<script type=”text/javascript”>
var oFCKeditor = new FCKeditor( ‘Content' ) ;
oFCKeditor.BasePath = ‘fckeditor/' ;
oFCKeditor.ToolbarSet = ‘Basic' ;
oFCKeditor.Width = ‘100%' ;
oFCKeditor.Height = ‘400′ ;
oFCKeditor.Value = ” ;
oFCKeditor.Create() ;
</script>
FCKeditor js調(diào)用方法二
復(fù)制代碼 代碼如下:
<script src=”fckeditor/fckeditor.js”></script>
<script type=”text/javascript”>
function showFCK(){
var oFCKeditor = new FCKeditor('Content') ;
oFCKeditor.BasePath = ‘fckeditor/' ;
oFCKeditor.ToolbarSet = ‘Basic' ;
oFCKeditor.Width = ‘100%' ;
oFCKeditor.Height = ‘200′ ;
oFCKeditor.Value = ” ;
oFCKeditor.ReplaceTextarea() ;
document.getElementByIdx(”btnShow”).disabled = ‘true';
document.getElementByIdx(”btnShow”).style.display = ‘none';
}
</script>
<textarea name=”Content”></textarea>
<input id=btnShow style=”display:inline” type=button onclick=”showFCK()”>
您可能感興趣的文章:
- PHP中CKEditor和CKFinder配置問題小結(jié)
- 針對PHP環(huán)境下Fckeditor編輯器上傳圖片配置詳細(xì)教程
- 探討fckeditor在Php中的配置詳解
- fckeditor編輯器在php中的配置方法
- php下FCKeditor2.6.5網(wǎng)頁編輯器的使用方法
- php ckeditor上傳圖片文件名亂碼解決方法
- php fckeditor 調(diào)用的函數(shù)
- fckeditor在php中的用法(添加于修改寫成了函數(shù))
- 將FCKeditor導(dǎo)入PHP+SMARTY的實(shí)現(xiàn)方法
- jQuery+PHP發(fā)布的內(nèi)容進(jìn)行無刷新分頁(Fckeditor)
- php版本CKEditor 4和CKFinder安裝及配置方法圖文教程
相關(guān)文章
laravel與thinkphp之間的區(qū)別與優(yōu)缺點(diǎn)
這篇文章主要介紹了laravel與thinkphp之間的區(qū)別與優(yōu)缺點(diǎn),從多個方面對比,有正好使用這兩個框架的同學(xué)可以研究下2021-03-03PHP實(shí)現(xiàn)二維數(shù)組按照指定的字段進(jìn)行排序算法示例
這篇文章主要介紹了PHP實(shí)現(xiàn)二維數(shù)組按照指定的字段進(jìn)行排序算法,涉及php針對數(shù)組的遍歷、排序等相關(guān)操作技巧,需要的朋友可以參考下2019-04-04