以下是自定义组件页面中的代码。在Joomla之外,显示CKEditor,但在Joomla中,它只显示默认的textarea。请帮忙! >
<fieldset>
<legend>System Text</legend>
<select name="txtid">
<option value="">Change Page</option>
<option value="1">Homepage Steps</option>
</select>
<h2>Setting 1</h2>
<p>
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
</p>
<script type="text/javascript">
//<![CDATA[
// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
CKEDITOR.replace( 'editor2',
{
extraPlugins : 'uicolor',
uiColor: '#14B8C4',
toolbar :
[
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
[ 'UIColor' ]
]
} );
//]]>
</script>
</fieldset>
&GT;
答案 0 :(得分:0)
这是我使用的:
$editor =& JFactory::getEditor();
$editor_params = array('theme' => 'simple');
echo $editor->display('htmlDescription',$htmlDescr , '100%', '250', '50', '15', 'false', $editor_params);
答案 1 :(得分:0)
$editor =& JFactory::getEditor();
echo $editor->display('desc',"content in textarea" ,'50%', '300px', '75', '20', false);