Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20139

Allow admins to configure which TinyMCE toolbar buttons are used on their site

    Details

    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE

      Description

      Related discussions:
      http://moodle.org/mod/forum/discuss.php?d=122460#p546841
      http://moodle.org/mod/forum/discuss.php?d=130470

      Attached: TinyMCE init code that will produce the editor in the screenshot. Note that this change does not require changing the code of TinyMCE but just of the JS code that calls TinyMCE.

      Still required: Integration as Moodle default. I could not find out how to do this.

      The goal of this change is to reduce the three row toolbar in TinyMCE to two rows, making it resemble the legacy HTMLarea more. There are two reasons for this:

      • the HTMLarea toolbar design seems to have seemingly good defaults for everyday use, and
      • since users in 1.9 are used to it, there is no risk in keeping the same toolbar (= WOW. for once we actually know what many users will expect).

      On the other hand, the TinyMCE default of three rows is really a usability disaster.

      I did regroup the buttons a bit from what they are in HTMLarea, to have related items grouped together and unrelated ones separated - and to accommodate the elements that were removed or replaced.

      Removed vs. the TinyMCE in Moodle HEAD atm:

      • The style menu that was broken
      • citation,abbreviation,acronym
      • select all - there is a quite ubiquitous shortcut key ctrl+a and this can be emulated with the mouse too
      • preview (this should be provided by Moodle and not within TinyMCE - perhaps as a quick javascript like TinyMCE does now, or just a plain old slow preview POST button - if the content of the form is more complex than one editor, Moodle can preview the result of all the fields in a composite preview, whereas TinyMCE can only show the preview of that one rich field, which is kind of pointless since it is a WYSIWYG editor anyway)
      • visual control characters on/off
      • edit css style
      • insert new layer (the layer created is positioned absolutely so there is usually no way for the user to know where on the page the layer will end...)
      • insert/edit embedded media
      • create anchor
      • insert/edit embedded media (removed due to lack of space, can perhaps be put back)

      Removed vs. HTMLarea

      • Clean Word HTML (paste from word is there though)
      • Lang menu (was not in tinymce full featured),
      • fullscreen
      • Justify both left and right - rarely needed and often considered harmful for legibility for reading onscreen

      Added vs. HTMLarea

      Instead of the popup window in HTMLarea, fullscreen in TinyMCE takes up the entire viewport for the rich text editor.
      Was there an equation editor? Where has that gone?

        Gliffy Diagrams

          Attachments

          1. 2010-10-18 moodle 3-row tinymce suggestion.png
            2010-10-18 moodle 3-row tinymce suggestion.png
            15 kB
          2. buttons removed from tinymce.png
            buttons removed from tinymce.png
            24 kB
          3. current version a.k.a we're all gonna die horribly unless we get to a lifeboat somewhere here.png
            current version a.k.a we're all gonna die horribly unless we get to a lifeboat somewhere here.png
            17 kB
          4. custom theme with 800 x 600 px screen.jpg
            custom theme with 800 x 600 px screen.jpg
            59 kB
          5. Editor switcher.jpg
            Editor switcher.jpg
            27 kB
          6. Kitchen sink plugin.jpg
            Kitchen sink plugin.jpg
            53 kB
          7. Must-have-buttons.jpg
            Must-have-buttons.jpg
            18 kB
          8. patch.txt
            3 kB
          9. patch2.png
            patch2.png
            14 kB
          10. patch2.txt
            3 kB
          11. pdw.zip
            4 kB
          12. Screenshot-1.png
            Screenshot-1.png
            40 kB
          13. The most useful plugin on earth.jpg
            The most useful plugin on earth.jpg
            149 kB
          14. tiny.html
            1 kB
          15. Yesterday - Today.jpg
            Yesterday - Today.jpg
            53 kB

            Issue Links

              Activity

                People

                • Votes:
                  10 Vote for this issue
                  Watchers:
                  12 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: