Is it possible to do disable the text-formatting options in the Moodle "editor" input field?

Is it possible to do disable the text-formatting options in the Moodle "editor" input field?

av Gustavo Araújo -
Galle vástádusa: 2

Hi!
I am novice Moodle Developer and I've been having trouble with this specific problem. I have an editor field in a form of a local plugin I'm making, but I need to disable the text formatting buttons that are shown on the "header" of the editor, without disabling the other buttons. I tried looking in the Documentation but didn't find anything that could help me in this, and also did not found any forum post with the same problem.

Thanks in advance for any answer!

Gjennomsnittlig vurdering: -
Vástádussan geasa: Gustavo Araújo

Re: Is it possible to do disable the text-formatting options in the Moodle "editor" input field?

av Mark Sharp -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers
If I understand you right, it's only for this specific text editor that you want to limit the buttons that are visible.
The only way I see if for you to manage your own form. Do a search in the code for `->use_editor` and this will list where the atto editor has been customised. In the options you can specify which buttons are visible instead of the default.

An alternative, is to try to identify the css ids for the buttons on your particular page and see if you can hide them.

I wonder if it's really worth the effort though.