We have 2 applications: 1 episerver where editors work and 2 WebApp which uses episerver API to get data in json format and just dispay it.I made that now in preview mode epi redirect to the second app with spesial flag that allow to see notpublished data. so epi uses the second app for preview.
But the main problem here that it just render how it could look like, but I need to allow editing in that preview mode.
I tried to add special html attributes to the page at the second app like this
<h1 data-epi-edit="Title" class="title title--top-padding">Title</h1>
But it does not work. H1 is not editable in preview mode.
What am I missing? What else whould be done if I use another app for preview? Or is it possible to edit properties while using another app in preview?
You will need to ensure the correct scripts are specified on the delivery app and the CORS issues are resolved.
My advise would be to review the React SPA Foundation repository found on Git and also watch this video from David : Video: Set up Optimizely Foundation Single Page Application reference | david-tec.com
This should set you on your way of getting the OPE working when using a decoupled front end.
Hope this helps