MDL-14741

* enables the full xhtml ruleset by default
 * creates two distinct configuration sets (simple and advanced)
 * makes the editor work on IE and Safari
 * the administrator-specified buttons have been disabled (will be re-enabled later)
This commit is contained in:
scyrma
2008-06-11 08:32:46 +00:00
parent 4336179cd6
commit bd526cb377
2 changed files with 60 additions and 20 deletions
+5 -14
View File
@@ -17,6 +17,7 @@ class htmlEditor {
public function configure($editor = NULL) {
global $CFG;
static $configured = Array();
if ($editor == '') {
$editor = (isset($CFG->defaulthtmleditor) ? $CFG->defaulthtmleditor : '');
@@ -27,10 +28,13 @@ class htmlEditor {
switch ($editor) {
case 'tinymce':
$configuration = <<<EOF
if (!isset($configured['tinymce'])) {
$configuration = <<<EOF
<script type="text/javascript" src="{$CFG->wwwroot}/lib/editor/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="{$CFG->wwwroot}/lib/editor/tinymce.js.php"></script>
EOF;
$configured['tinymce'] = true;
}
break;
case 'fckeditor':
@@ -82,19 +86,6 @@ EOF;
return $configuration;
}
public function activateEditor($name='', $id='') {
$configuration = <<<EOF
<script type="text/javascript">
createHTMLArea('$id');
</script>
EOF;
return $configuration;
}
}
?>