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

TinyMCE "no auto link" should only be added to the quick toolbar if it is already available

    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-83051-403
    • MDL-83051-404
    • MDL-83051-main
    • Hide

      Testing

      1. Login as admin
      2. Go to site admin > text editors > general settings under TinyMCE editor
      3. Enable the "No auto-link" plugin
      4. Create a course if you don't have one
      5. Create a quiz in that course
      6. Add a new matching question
      7. Verify that no auto-link "!" plugin is in tiny toolbar
      8. Type two words: One two into tiny editor
      9. Double click the word "two"
      10. Verify that there is no quick selection toolbar being displayed
      11. Go to user profile and click on edit profile
      12. Verify that no auto-link "!" plugin is in tiny toolbar
      13. Type two words: One two into tiny editor in description section
      14. Double click the word "two"
      15. Verify that quick selection toolbar is displayed with the "!" at the end
      Show
      Testing Login as admin Go to site admin > text editors > general settings under TinyMCE editor Enable the "No auto-link" plugin Create a course if you don't have one Create a quiz in that course Add a new matching question Verify that no auto-link " ! " plugin is in tiny toolbar Type two words: One two into tiny editor Double click the word "two" Verify that there is no quick selection toolbar being displayed Go to user profile and click on edit profile Verify that no auto-link " ! " plugin is in tiny toolbar Type two words: One two into tiny editor in description section Double click the word "two" Verify that quick selection toolbar is displayed with the " ! " at the end

      We have some custom logic in TinyMCE which means we only display the quick toolbar (when highlighting text in the editor) if the editor is of a minimum height (5 rows high), which is working as expected - smaller editors show no quick toolbar. However, if the "no auto link" feature is enabled, it always appends itself to the quick toolbar, even if we intend to not have that toolbar available. The result is that on short editors, such as those when creating multi choice questions, instead of never having the quick toolbar (expected), they will have one with a single item; the no auto link (actual).

      We need to add a check to lib/editor/tiny/plugins/noautolink/amd/src/configuration.js so that it only appends the feature if the toolbar is not set to false (ie only include it if instanceConfig.quickbars_selection_toolbar !== false).

      No auto link is the only core override on this, so is the only place this needs updating.

            stevani.andolo@moodle.com Stevani Andolo
            michaelh Michael Hawkins
            Michael Hawkins Michael Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

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