I'm loading up the moodle text editor on various pages loaded through ajax, so what i'm doing is:
require_once $CFG->dirroot.'/lib/form/editor.php';
require_once $CFG->dirroot . '/lib/editorlib.php';
$editor = \editors_get_preferred_editor();
$editor->use_editor("elbpfe_{$id}_{$this->id}");
$output .= "<textarea id='elbpfe_{$id}_{$this->id}'>".$this->getValue()."</textarea>";
So I'm getting the preferred editor and applying it to the textarea field which I output, then at the end of the content I do:
global $PAGE;
$code = $PAGE->requires->get_end_code();
return $code;
To get the javascript to actually create the texteditor.
It's working fine except for one thing, in that the strings for various things are not being changed from the defaults in the tinymce template.
E.g:
So you can see that instead of things like "font family", "font size", etc.. the strings have come back as "advanced.font_size", "advanced.font_family", etc...
Does anyone know what else I need to do to sort this out?
Cheers.