XOOPS中的编辑器类

 

 在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);