Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for adding link to "Anchor on a page" in WYSIWYG editors #186

Closed
5 tasks done
robbieaverill opened this issue Feb 11, 2018 · 3 comments
Closed
5 tasks done

Comments

@robbieaverill
Copy link
Contributor

robbieaverill commented Feb 11, 2018

image

This functionality in the CMS lets you add a link to an anchor on an arbitrary page. With elemental enabled on a page this won't automatically populate a list of available anchors, since it'll be reading and parsing the page's Content field.

If we can augment the search location for HTML then we can tie it into the method that returns an entire page's elemental content for the sake of search indexing (see #163).

From a data point of view we definitely want to avoid duplicating all element data into the page's Content field.

Note that currently a WYSIWYG inside an elemental block is able to link to anchors within itself, but not within other elemental blocks on the same or on other blocks. On save, these links get marked as broken, even though they work.

Acceptance Criteria

  • Using the "anchor on a page" link in a WYSIWYG field (either directly on a page or inside an elemental block), I can link to anchors inside elemental blocks on a different page
  • Using the "anchor on a page" link in a WYSIWYG field, I can link to anchors inside the same elemental block I am editing
  • Using the "anchor on a page" link in a WYSIWYG field, I can link to anchors inside other elemental blocks on the same page
  • Links to anchors inside elemental blocks are not marked as broken
  • Links to anchors that do not exist on the page or in any elemental blocks are marked as broken

PRs

@brynwhyman
Copy link

Thinking a higher level API would be required for this. There's a number of modules that would also be affected by this too: externallinks, fulltextsearch, maybe more?

@MichelleZZZZ
Copy link

Hi @robbieaverill

I have a similar issue with Anchor on the Elemental block(not inline form). And I would like to ask if the fix might happen at some stage?

Cheers

@robbieaverill
Copy link
Contributor Author

Hi @MichelleZZZZ, I'm not sure what the roadmap looks like but @brynwhyman may be able to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants