chapter-three / AppleNewsAPI

This is a PHP library that allows you to publish content to Apple News and construct documents in the Apple News JSON format.
MIT License
39 stars 25 forks source link

Allow Anchors to use 'target' rather than 'targetComponentIdentifier' #26

Open dustinleblanc opened 3 years ago

dustinleblanc commented 3 years ago

Apple supports both of these target types for anchors: https://developer.apple.com/documentation/apple_news/anchor

Allowing for setting anchors using just plain IDs instead of a component means that you can anchor items to specific paragraphs in a body field rather than anchoring to the body field itself (I am doing this within the context of a Drupal 8 site).

I imagine this would just be adding a setTarget to the Anchor class.