Moodle
  1. Moodle
  2. MDL-27761

Support for html anchor tags in 20_STABLE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      17419

      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>

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          The anchor button seems to have gone missing, and I'm not sure how or why. I'm not sure adding that button would help this problem as it seems to produce named anchors in the following form...

          <a name="xxx">blah</a>
          

          See the following link for a full demo.

          http://tinymce.moxiecode.com/tryit/full.php

          Show
          Michael de Raadt added a comment - The anchor button seems to have gone missing, and I'm not sure how or why. I'm not sure adding that button would help this problem as it seems to produce named anchors in the following form... <a name= "xxx" >blah</a> See the following link for a full demo. http://tinymce.moxiecode.com/tryit/full.php
          Hide
          Heiko Schach added a comment -

          We are missing anchors too.
          A solution to enabling the anchor button is discussed here:
          http://moodle.org/mod/forum/discuss.php?d=207682

          Show
          Heiko Schach added a comment - We are missing anchors too. A solution to enabling the anchor button is discussed here: http://moodle.org/mod/forum/discuss.php?d=207682
          Hide
          Petr Škoda added a comment -

          Thanks for the report, in 2.4 it will be possible to customise the toolbar buttons, please test and report any problems in MDL-34875.

          Show
          Petr Škoda added a comment - Thanks for the report, in 2.4 it will be possible to customise the toolbar buttons, please test and report any problems in MDL-34875 .

            People

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

              Dates

              • Created:
                Updated:
                Resolved: