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

Editor stylesheets does not include stylesheets for subplugins

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-75386-master
    • Hide
      1. Create a new file in lib/editor/tinymce/plugins/wrap/editor_styles.css, giving it contents:

        html body {
          background-color: pink;
        }
        

      2. Purge caches with mdk purge
      3. Log in
      4. Navigate to User menu -> Preferences -> Editor preferences
      5. Set your editor to TinyMCE
      6. Edit your profile
        1. Confirm that the TinyMCE editor has a pink background
      Show
      Create a new file in lib/editor/tinymce/plugins/wrap/editor_styles.css , giving it contents: html body { background-color: pink; } Purge caches with mdk purge Log in Navigate to User menu -> Preferences -> Editor preferences Set your editor to TinyMCE Edit your profile Confirm that the TinyMCE editor has a pink background
    • Team Hedgehog 4.1 sprint 0.2

      Moodle has support for two types of stylesheets in some plugins:

      • styles.css
      • editor_styles.css

      For editors which use a iframe for the editor content, we cannot just use the standard styles.css (boost and all) because it will bring in too much for the editor (things like background, margins, and so on). Instead we support an editor_styles.css sheet which has a minimal style set supplied by the theme, and editors.

      I discovered whilst implementing MDL-75071 that we currently do not generate editor CSS content for editor subplugins. This means that a plugin (such as the h5p plugin) is unable to set the style of the something like the h5p placeholder within the editor, and doing so requires changes to the editor's own editor_styles.css which would be a breach of component communication principles.

      This change adds support for subplugins to also provide their own editor_styles.css which will also be included and applied in these situations.

        1. MDL-75386_master.png
          34 kB
          John Edward Pedregosa
        2. MDL-75386_v311.png
          28 kB
          John Edward Pedregosa
        3. MDL-75386_v400.png
          44 kB
          John Edward Pedregosa

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Stevani Andolo Stevani Andolo
            Shamim Rezaie Shamim Rezaie
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 3 minutes
                2h 3m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.