Problems with the current editor? Use an alternative one! | |
|
We've been having numerous problems with the bundled HTML-editor with Moodle (versions 1.4 and 1.5). The copy of IE installed on the majority of the machines in the college wouldn't play ball. The HTML editor was a fairly big feature for us so after much searching and testing different HTML editors I managed to get an open-source editor working. Fortunately its VERY easy to integrate a new editor without breaking the existing editor (should you need to go back to it). Go to: http://tinymce.moxiecode.com/download.php and download the standard version of the editor. In the archive find the folder jscripts/tiny_mce. Extract tiny_mce to moodle/lib/editor. Now open up moodle/lib/weblib.php, scroll down to function (roughly line 2965). Modify the code of this function to the following: /// $width and height are legacy fields and no longer used as pixels like they used to be. global $CFG, $course; $mincols = 65; if (empty($courseid)) { if (empty($scriptcount)) { /*if ($usehtmleditor) { if (!empty($courseid) and isteacher($courseid)) { if ($height) { // Usually with legacy calls if (!empty($courseid) and isteacher($courseid)) { if ($height) { // Usually with legacy calls echo '<textarea id="edit-'. $name .'" name="'. $name .'" rows="'. $rows .'" cols="'. $cols .'">'; Thats it! Its not fully integrated, but it will work and it works really quite well. I'm going to carry on customising it to match our requirements, but all options are fairly simple. I've commented out the changed code, so if you want to go back to the old version just uncomment that, and comment out the 'new' if statement. |
Re: Problems with the current editor? Use an alternative one! | |
| Oh forgot you also need to comment out the code in the function 'function use_html_editor($name='', $editorhidebuttons='') {' |
Re: Problems with the current editor? Use an alternative one! | |
|
Thanks for the tips. However, when I comment out the 'function_use_html_editor' functions, book module
gives error. Of course I could correct it. However, I could not see all
the buttons in the editor (as given in the example_full). Should I
change any javascript? Let me try with other modules and send the feedback later. |
Re: Problems with the current editor? Use an alternative one! | |
|
Hi, I tried your solution. However there is a response from server
about unexpected/expected * in weblib.php. I have copied and pasted
your solution but with no luck. I use tinymce in mambo and it is a good
solution for different browsers. Ah, I am using Moodle 1.5.2 Please help. Alamir |