I am using joomla 1.7 and I am made a custom button (editor-xtd plugin) that I want to insert some string into the current editor content.
Like in the Readmore button. I have searched through the Readmore code and found :
$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);
}
}
";
now when I try to call jInsertEditorText, I seem to get an error that's it's missing. some forum suggested I import mootools.js, but that didn't seem to do the trick.
Where can I find it or is there some other approach?