.
/**
* TinyMCE text editor integration.
*
* @package moodlecore
* @subpackage editor
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tinymce_texteditor extends texteditor {
public function supported_by_browser() {
if (check_browser_version('MSIE', 5.5)) {
return true;
} else if (check_browser_version('Gecko', 20030516)) {
return true;
} else if (check_browser_version('Safari', 3)) {
return true;
} else if (check_browser_version('Opera', 9)) {
return true;
}
return true;
}
public function get_supported_formats() {
return array(FORMAT_HTML => FORMAT_HTML);
}
public function get_preferred_format() {
return FORMAT_HTML;
}
public function supports_repositories() {
return true;
}
public function get_editor_element_class() {
return 'form-tinymce-advanced';
}
public function get_legacy_textarea_class() {
return 'form-tinymce-legacy';
}
public function header_js() {
global $CFG;
$usehttps = (int)($CFG->httpswwwroot !== $CFG->wwwroot); //hmm, is there a better test?
$js = ''."\n".
''."\n";
return $js;
}
}