silverstripe-cms: Cannot insert anchors into a page or use the link to anchor dialogue

Currently TinyMCE provides the ability to link to an anchor in a page but not a way to add an anchor (other than editing HTML).

Additionally, the dialogue for selecting anchors on pages doesn’t actually show any anchors - in either of the way anchors work in HTML5 (as <a name="anchor"> or just `id=“anchor”)

This issue was raised in a CMS content author training.

Pull requests

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 16 (11 by maintainers)

Most upvoted comments

I will be putting this forward as something we could do as part of some upcoming work but I can’t promise anything. There have been some designs done for the link component in include anchors but not planned in any set of work as yet.

I’m going to re-code this as a bug because it’s functionality that should exist but is broken, if anyone disagrees feel free to justify =)

If a user adds an anchor via the anchor button in TinyMCE, the Insert Link dialog/ ‘Anchor on a page’ does not list newly created anchors.

They only show up if the user firstly; creates an anchor, then saves the page (either draft or publish) and then refreshes the edit page from their browser.

Steps to reproduce:

  1. Create a page.
  2. Create an anchor on that page.
  3. Enter a couple of paragraphs of text as Content on that page (see http://lipsum.com).
  4. Create a link at the base of the content to link to the anchor at the top.

This is currently impossible (note the absence of “save the page” before the last step).