MDL-14741: use the default html editor, as chosen in the admin settings
[moodle.git] / lib / form / htmleditor.php
index 20d1109..8eb68de 100644 (file)
@@ -61,9 +61,8 @@ class MoodleQuickForm_htmleditor extends MoodleQuickForm_textarea{
 
     function toHtml(){
         if ($this->_canUseHtmlEditor && !$this->_flagFrozen){
-            ob_start();
-            use_html_editor($this->getName(), '', $this->getAttribute('id'));
-            $script=ob_get_clean();
+            global $htmlEditorObject;
+            $script = $htmlEditorObject->activateEditor($this->getName(), $this->getAttribute('id'));
         } else {
             $script='';
         }
@@ -96,4 +95,4 @@ class MoodleQuickForm_htmleditor extends MoodleQuickForm_textarea{
         return $html . $this->_getPersistantData();
     } //end func getFrozenHtml
 }
-?>
\ No newline at end of file
+?>