I'm using a wagtail as a headless CMS. I want to enable users of this CMS to easily see the preview of the page on a SPA. I've overridden APIs to expose draft pages with help of token.
The only part I'm stuck at is modifying the URL in the Preview button to redirect to the SPA so that they can hit the API, get the data and render the page.
Is there any way I can override the URL of the preview button or just be able to add another action to see preview of the page on a SPA?