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

Support resolution of all data-* attributes of links #258

Open
petrsvihlik opened this issue Jan 21, 2021 · 0 comments
Open

Support resolution of all data-* attributes of links #258

petrsvihlik opened this issue Jan 21, 2021 · 0 comments
Labels
enhancement rich-text Features and bugs related to rich-text resolution.
Milestone

Comments

@petrsvihlik
Copy link
Contributor

Motivation

The current solution supports the resolution of only data-item-id (in the ContentLinkResolver) and data-asset-id (in the RichTextContentConverter). Other data attributes are unsupported.

The problem is related to #243

Proposed solution

Add support for resolution of:

  • data-email-address
  • data-email-subject
  • data-new-window

Additional context

Sample request: https://deliver.kontent.ai/900564fb-873d-4916-ac65-ae148ef3ae12/items

 "modular_content": [],
          "value": "<p><a data-email-address=\"[email protected]\" data-email-subject=\"hey!\" href=\"mailto:[email protected]?subject=hey%21\">Mail link</a></p>\n<p>texttext</p>\n<p><a href=\"https://kontent.ai/\" data-new-window=\"true\" title=\"this leads to heaven\" target=\"_blank\" rel=\"noopener noreferrer\">Web Link</a>&nbsp;</p>\n<p>someothertext</p>\n<p><a data-asset-id=\"8d6096cf-5617-4e33-ae9d-f3b596ed557c\" href=\"https://assets-us-01.kc-usercontent.com:443/900564fb-873d-4916-ac65-ae148ef3ae12/dfac4580-5434-489a-9a4c-5501a4fff3d3/avocado-icon-24x24.png\">Asset link</a></p>\n<p>extra text</p>\n<p><a data-item-id=\"65de4914-d241-4f1f-8079-511b3461b438\" href=\"\">Content Item link</a></p>\n<p>final text&nbsp;</p>"
        },
@petrsvihlik petrsvihlik added enhancement rich-text Features and bugs related to rich-text resolution. labels Jan 21, 2021
@petrsvihlik petrsvihlik added this to the v15 milestone Jan 21, 2021
@petrsvihlik petrsvihlik modified the milestones: v15, v16 - rich-text Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement rich-text Features and bugs related to rich-text resolution.
Projects
None yet
Development

No branches or pull requests

1 participant