Joomla調用系統內建編輯器的實現方法,joomla調用
本文執行個體講述了Joomla調用系統內建編輯器的方法。分享給大家供大家參考,具體如下:
調用Joomla系統帶的編輯器:
路徑: /libraries/joomla/html/editor.php
類:JEditor
函數: void display( string $name, string $html, string $width, string $height, int $col, int $row, [boolean $buttons = true], [string $id = null], [string $asset = null], [object $author = null], [array $params = array()])
參數說明:
string $name 控制項的名稱, (會出現在控制項的name裡)
string $html 文本地區的內容
string $width 該文本的面積的寬度
string $height 該文本的面積的高度
int $col 對textarea的列數
int $row 對textarea的行數
boolean $buttons 為true 時編輯器按鈕會顯示出來
string $id 控制項的id值,如果不給id值,會顯示控制項的名稱 (會出現在控制項的id裡)
string $asset
object $author
array $params 關聯陣列編輯器的參數。
例子:
在view.html.php中
$editor =& JFactory::getEditor();
在模板檔案default.php中
複製代碼 代碼如下:echo $editor->display('控制項name值','內容','寬','高','列數','行數',true, '控制項id值');
更多關於joomla相關內容感興趣的讀者可查看本站專題:《Symfony架構入門教程》、《Yii架構入門及常用技巧總結》、《php優秀開發架構總結》、《smarty模板入門基礎教程》、《ThinkPHP常用方法總結》、《php物件導向程式設計入門教程》、《php字串(string)用法總結》、《php+mysql資料庫操作入門教程》及《php常見資料庫操作技巧匯總》
希望本文所述對大家基於joomla程式設計有所協助。
http://www.bkjia.com/PHPjc/1123808.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1123808.htmlTechArticleJoomla調用系統內建編輯器的實現方法,joomla調用 本文執行個體講述了Joomla調用系統內建編輯器的方法。分享給大家供大家參考,具體如下: 調...