Heim  >  Artikel  >  Backend-Entwicklung  >  Joomla调用系统自带编辑器的实现方法_php实例

Joomla调用系统自带编辑器的实现方法_php实例

WBOY
WBOYOriginal
2016-06-07 17:07:37692Durchsuche

本文实例讲述了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程序设计有所帮助。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn