remove options from toolbar?

remove options from toolbar?

by J P -
Number of replies: 2

Is there a way to remove specific options from the HTML editor toolbars?  I want to prevent students from being able to change the font (font, size, color), but can't see where I'd be able to edit this.

Thanks!

Average of ratings: -
In reply to J P

Re: remove options from toolbar?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This was possible in Moodle 1.9, and went away in Moodle 2.0, with the change to the TinyMCE editor. That was only becuase no-one has had time to re-do it. It is not fundamentally hard.

If you want a temporary fix, go into the code in lib/editor/tinymce/lib.php, in the get_init_params method (around like 84). Around like 138, you can see where it controls with toolbar buttons appear. If you edit that (and then probably click the 'Purge all caches' link in the footer, you may be able to achieve the effect you want.

In reply to Tim Hunt

Re: remove options from toolbar?

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Yes it is possible in Moodle 2, but as Tim suggests, you have to look for it, Tim's instructions are accurate and helpful, as always. Go to the TinyMCE site for further information and if you start there, that gives you a reasonable breakdown of what else can be done.

The problem is if there is an update, then you will lose your modifications. However, if you do not have the time to do that, repeatedly, you can always download Mauno K's SEE package and use the tinyMath editor, that gives you control over the buttons you may want. When you  update, you will be able to keep any modifications you made, Moodle core does not overwrite third party editors..smile  

(The link above contains the link to the package as well as the tinyMath editor setup instructions. You can extract out just the editor and follow the instructions here to configure it.)