Getting the id of the content that is edited in live preview (headless mode) #11904
Unanswered
benebene84
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We use statamic as a headless cms for a nextjs frontend. The live preview works fine and we are able to use the token that is part of the url to get the most recent data and render it in the iframe live-preview.
The only thing that is a bit unfortunate is, that with reloading the page it will always jump back to the top of the page. Our idea was to scroll to the element that was edited. From the API we get a unique id for every content that we can render on the frontend and scroll to it based on that id. However I am missing some information:
Any help much appreciated!
Thanks
Benedikt
Beta Was this translation helpful? Give feedback.
All reactions