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

Support for html anchor tags in 20_STABLE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0.3
    • Fix Version/s: None
    • Component/s: HTML Editor (TinyMCE)
    • Labels:
    • Testing Instructions:
      Hide

      1. Create an html element/page.
      2. Create an empty anchor
      3. Create an non-empty anchor
      4. Click save
      5. Re-edit the page

      Show
      1. Create an html element/page. 2. Create an empty anchor 3. Create an non-empty anchor 4. Click save 5. Re-edit the page
    • Workaround:
      Hide

      If you are able to edit the HTML (and it looks like you are) you can used a link to an element with an id, like so...

      <h1 id="heading1">Heading 1</h1>
      <p>Test</p>
      <h2>Heading 2</h2>
      <p>Test</p>
      <p><a href="#heading1">Test link</a></p>

      Show
      If you are able to edit the HTML (and it looks like you are) you can used a link to an element with an id, like so... <h1 id="heading1">Heading 1</h1> <p>Test</p> <h2>Heading 2</h2> <p>Test</p> <p><a href="#heading1">Test link</a></p>
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      I'm missing a button to create an html anchor

      <a name="anchor">foo</a>

      in the html editor.
      However if I use the html source code editor to set the anchor manually I experience the following behaviour:

      1. If the anchor tag is empty

      <a name="anchor"></a>

      it is deleted on save.
      2. If the anchor tag is not empty

      <a name="anchor">foo</a>

      the anchor gets destroyed upon the next edit session.

      <a name="anchor">foo</a>

      becomes

      <a>foo</a>

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  5 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: