[英]Joomla ajax editor
Hi I am still struggling with a Joomla editor question: 嗨,我仍在努力解决Joomla编辑器问题:
Can I have two or more text editors on one page (I think yes) 我可以在一页上有两个或多个文本编辑器吗(我认为是)
If so how can I put a second one on the page using AJAX. 如果是这样,我如何使用AJAX在页面上放置第二个。
I can get the ajax etc working but the part of the script to put the editor on screen results in an error: 我可以使ajax等正常工作,但是将编辑器显示在屏幕上的脚本部分导致错误:
HP Fatal error: Call to undefined method JDocumentRaw::addCustomTag() HP致命错误:调用未定义的方法JDocumentRaw :: addCustomTag()
code snippet for the called ajax code is: 被调用的ajax代码的代码片段为:
$document =& JFactory::getDocument();
$editor = JFactory::getEditor();
$params = array( 'smilies'=> '0' ,
'style' => '1' ,
'layer' => '0' ,
'table' => '0' ,
'clear_entities'=>'0'
);
$obj->{'postsHolder'} .= $editor->display( 'desc', '', '400', '400', '20', '20', false, $params );
Thanks for any help you can give me 感谢你给与我的帮助
Without seeing the code that is triggering the error, it is tough to be sure, but I believe the issue is with how you are adding your custom tag. 没有看到触发错误的代码,很难确定,但是我相信问题在于您如何添加自定义标记。 With the above close, you can do this with:
结束以上操作后,您可以执行以下操作:
$document->addCustomTag($tag);
See http://docs.joomla.org/JDocumentHTML/addCustomTag 参见http://docs.joomla.org/JDocumentHTML/addCustomTag
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.