I'm trying to add anchors within a TR so I can create a table of contents: click the name of a month in the TOC, jump to that month in the TR. Tinymce strips out the anchors every time I place them, despite all kinds of confusing behavior to the contrary. Let me give you an example (if you wish, you can look at TR 18940, which isn't publicly available):
Code: Select all
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><a href="#october">October</a></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque lacus libero, sollicitudin at urna et, posuere volutpat augue. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris pharetra porttitor dui, eu placerat mauris porttitor eget. Maecenas placerat porta lectus id consectetur. Proin commodo purus sit amet felis malesuada, at porta felis tincidunt. Nulla blandit facilisis magna id mollis. Nullam ac nibh nulla. Duis consequat, libero sed accumsan luctus, tortor libero vehicula ex, nec condimentum mi ligula non magna. Vivamus egestas eleifend elit at mollis.</p>
[a few more paragraphs of junk here, stripped for the purpose of this post, but serves to allow the page to visually jump to the anchor]
<p>Pellentesque pellentesque venenatis facilisis. Maecenas ultrices libero at vehicula tincidunt. Donec magna arcu, molestie porttitor bibendum id, faucibus ut dolor. In et mattis turpis, non cursus urna. Praesent egestas condimentum suscipit. Duis finibus, magna id porttitor suscipit, dui ipsum vehicula augue, non tempor lacus tellus vitae risus. Suspendisse iaculis lectus in odio vulputate, vel hendrerit erat rutrum. Donec commodo nec libero ac luctus. Nunc fermentum nibh tellus, et molestie risus luctus ut. In venenatis neque non mattis tempus. Cras ornare fermentum nisi id maximus.</p>
<a name="october"></a><h1>October</h1>
</body>
</html>
I am able to create an anchor, and Tinymce even puts in an anchor icon (see the image below) but then removes it when I save the TR.
I have also attempted to give the header element its own ID, like
Code: Select all
<h1 id="october">October</h1>
Even more strange, when I use the graphic editor to place a link, and click the "name" box a drop down menu appears where the October link is shown, (I have no idea why or where it got that from and now it won't go away, no matter what I do), as well as <top> and <bottom> (both of which make sense, and work as expected):
If I click the "October" link in the drop down it then automatically sets itself to "#h_90554721421553211074647", which I'm not sure where it got that from (perhaps each link gets a unique ID inside the system?), proceeds to strip itself upon saving, and then magically changes back to "#october", an in-page link, when previewing the report.
If I attempt to add an anchor on a line entirely by itself, such as:
Code: Select all
<a id="october"></a>
Alas, this still does nothing, and even more strange, the source code editor (which is where I'm adding <a id="october"></a> in the first place) immediately replaces the entire anchor with a non-breaking space on its own paragraph (<p> </p>), but the link editor dynamically adds the anchor drop down; that is, until I save the TR, upon which it is all simply converted into an empty paragraph.
I'm not sure what to make of all of that. Am I doing something wrong? Is using in-page anchoring something that should be possible? It would be very useful for multi-peak/multi-trip combined reports!