我无法将编辑器添加到自定义组件的前端,也无法在线找到任何帮助.它应该真的很简单吗?
我从某个地方获得了此代码,但即使它显示的是简单的文本区域,我也检查了用户的编辑器选项,并尝试将其手动设置为TinyMCE,但仍显示简单的纯文本区域
jimport( 'joomla.html.editor' );
$editor =& JEditor::getInstance();
echo $editor->display("jobdesc", ""/*$itemData['body']*/, "400", "100", "150", "10", 1, null, null, null, array('mode' => 'advanced'));
解决方法:
您可以使用JFactory加载编辑器.
$editor = JFactory::getEditor();
echo $editor->display("jobdesc", ""/*$itemData['body']*/, "400", "100", "150", "10", 1, null, null, null, array('mode' => 'advanced'));
http://docs.joomla.org/JFactory/getEditor