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

Additional HTML coding in Atto breaks Table of Content creation in Wiki

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.9.3, 3.10
    • Wiki (2.x)
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-70521-401-wiki-toc-html-with-attributes
    • MDL-70521-master-wiki-toc-html-with-attributes
    • Hide

      1. Create a course.
      2. Add a Wiki activity and choose HTML as format.
      3. Create a page, choose HTML format and click the Create page button
      4. In the ATTO editor, click the "Show more" button to see the extended toolbar. There click the HTML button to switch to the source code view were you would see the HTML source.
      5. Insert the following data:

      <h1>This will have a toc.</h1>
      This is paragraph 1.<h1 style="color: red">This will also have a toc now.</h1>
      That is paragraph 2.

      ... click the HTML button again to switch back to WYSIWYG mode and save the page.
      6. Verify that the wiki has two entries as toc:

      This will have a toc.
      This will also have a toc now.

      7. Click the edit links and check that the editor opens with the correct headine and paragraph.

      Show
      1. Create a course. 2. Add a Wiki activity and choose HTML as format. 3. Create a page, choose HTML format and click the Create page button 4. In the ATTO editor, click the "Show more" button to see the extended toolbar. There click the HTML button to switch to the source code view were you would see the HTML source. 5. Insert the following data: <h1>This will have a toc.</h1> This is paragraph 1. <h1 style="color: red">This will also have a toc now.</h1> That is paragraph 2. ... click the HTML button again to switch back to WYSIWYG mode and save the page. 6. Verify that the wiki has two entries as toc: This will have a toc. This will also have a toc now. 7. Click the edit links and check that the editor opens with the correct headine and paragraph.

      In Moodle 3.9, in a Wiki activity, with HTML editor enabled, it is not possible to automatically create a Table of Contents with the ATTO text formatting header options.

      The headers do appear, but a TOC doesn't display, as can be seen in the screenshots attached.

      To reproduce the issue:

      • Create a course
      • Add a wiki
      • Set the wiki to HTML editor
      • Create a page with at least a large, medium and small header using the ATTO text editor and save
      • Check to see if a TOC appears

      If a TOC doesn't appear, check to see if the HTML contains 'clean' header tags, e.g. <h3></h3>, <h4></h4> or <h5></h5>. You'll see the header tags contain dir and class.

      I found these issues to occur in ATTO using Firefox and Chrome, not in Safari.

      Note: When you directly edit the HTML to remove the dir and class code from a header tag, that may solve part of the issue.

      The TOC creation seems to depend on 'clean' header tags.

       

        1. Schermafbeelding 2020-12-21 om 10.14.48.png
          112 kB
          Joost Elshoff
        2. Schermafbeelding 2020-12-21 om 10.05.46.png
          93 kB
          Joost Elshoff
        3. Schermafbeelding 2020-12-21 om 10.13.56.png
          124 kB
          Joost Elshoff
        4. Schermafbeelding 2020-12-21 om 10.14.05.png
          88 kB
          Joost Elshoff
        5. About listening code.txt
          3 kB
          James Thomas

            melanie.treitinger@ruhr-uni-bochum.de Melanie Treitinger
            jwelshoff Joost Elshoff
            Stephan Robotta Stephan Robotta
            Votes:
            10 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

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