Joomla調用系統(tǒng)自帶編輯器的實現方法
來源:易賢網 閱讀:1223 次 日期:2016-08-24 15:45:56
溫馨提示:易賢網小編為您整理了“Joomla調用系統(tǒng)自帶編輯器的實現方法”,方便廣大網友查閱!

本文實例講述了Joomla調用系統(tǒng)自帶編輯器的方法。分享給大家供大家參考,具體如下:

調用Joomla系統(tǒng)帶的編輯器:

路徑: /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 文本區(qū)域的內容

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程序設計有所幫助。

更多信息請查看網絡編程
關于我們 | 聯系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權所有:易賢網