XOOPS中的编辑器类

ezsky posted @ 2010年9月23日 05:28 in 未分类 with tags 编辑器 fckeditor xoops , 1336 阅读

 

 在xoops中调用编辑器2.3中有几种方法
1.XoopsFormDhtmlTextArea
这个似乎是做为一种兼容模式而生的,常规上没有问题,但是在调用tinymce上就出现了问题.
用法:

 

	$options['editor'] = 'fckeditor'; 
$form->addElement(new XoopsFormDhtmlTextArea(_NPRESS_AM_CONTENT, 'text_body', $text_obj->getVar('text_body', 'e'),'','','',$options), true);


2.XoopsFormEditor 这种方法是2.3中新添加的类,可以设置编辑器的宽高,尤其是对tinymce编辑器的调用上尤为重要.
直接看代码:

	$configs = array('editor'=>'tinymce','width'=>'100%','height'=>'500px','value'=>$art_obj->getVar('art_content', 'e')); 

$form->addElement(new XoopsFormEditor(_NPRESS_AM_CONTENT, 'art_content',$configs), true);

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter