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

TinyMCE can't add preformatted text or plaintext code block

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-80058-403
    • MDL-80058-main
    • Hide
      1. Log in as admin
      2. Navigate to the Edit profile page
      3. Scroll down to the description editor. Fill in the editor with:

        Test preformatted

      4. Block/highlight the text
      5. Click menu Format > Blocks > Preformatted
      6. Click menu View > Source Code
      7. Verify that the content is like the below

        <pre>Test preformatted</pre>

      Show
      Log in as admin Navigate to the Edit profile page Scroll down to the description editor. Fill in the editor with: Test preformatted Block/highlight the text Click menu Format > Blocks > Preformatted Click menu View > Source Code Verify that the content is like the below <pre>Test preformatted</pre>
    • 2
    • Team Hedgehog 2023 Sprint 4.3, Team Hedgehog 2023 Review 4

      The latest TinyMCE itself can change the current paragraph into preformatted text via Formatted→Blocks→Preformatted, but TinyMCE built in Moodle 4.1 & 4.3 has intentionally removed "Preformatted" from "Formatted→Blocks".
      We have no way to insert source code or commands in unsupported languages by Code Sample without editing the raw source code.

        1. (1) Passed -- (Main)MDL-80058.png
          (1) Passed -- (Main)MDL-80058.png
          23 kB
        2. MDL-80058_code.png
          MDL-80058_code.png
          36 kB
        3. moodle-4-3.png
          moodle-4-3.png
          38 kB
        4. original-component.png
          original-component.png
          208 kB

            meirza.arson@moodle.com Meirza
            tats-u tats-u
            Huong Nguyen Huong Nguyen
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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