我正在使用 Joomla 1.7,并且创建了一个自定义按钮(editor-xtd 插件),我想将一些字符串插入到当前编辑器内容中。
就像在 Readmore 按钮中一样。我搜索了 Readmore 代码,发现:
$js = "
function insertReadmore(editor) {
var content = $getContent
if (content.match(/<hr\s+id=(\"|')system-readmore(\"|')\s*\/*>/i)) {
alert('$present');
return false;
} else {
jInsertEditorText('<hr id=\"system-readmore\" />', editor);
}
}
";
现在,当我尝试调用时jInsertEditorText
,我似乎收到了一个错误,它丢失了。
一些论坛建议我导入 mootools.js,但这似乎没有奏效。
我在哪里可以找到它或有其他方法?