mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-19580 cleanup of require css and js filepicker code
This commit is contained in:
parent
b14e77c966
commit
ff5fe31160
14 changed files with 169 additions and 121 deletions
|
@ -51,11 +51,15 @@ class tinymce_texteditor extends texteditor {
|
|||
return true;
|
||||
}
|
||||
|
||||
public function use_editor($elementid, array $options=null) {
|
||||
public function head_setup() {
|
||||
global $CFG, $PAGE;
|
||||
|
||||
require_once("$CFG->dirroot/repository/lib.php");
|
||||
$PAGE->requires->js('/lib/editor/tinymce/tiny_mce_src.js');
|
||||
$PAGE->requires->js('/lib/editor/tinymce/extra/tinymce_utils.js');
|
||||
}
|
||||
|
||||
public function use_editor($elementid, array $options=null) {
|
||||
global $PAGE;
|
||||
$PAGE->requires->js_function_call('mce_init_editor', array($elementid, $this->get_init_params($elementid, $options)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue