I can see the html hydrated and a div appear with the class prismic toolbar and an iframe but they seem empty.
After that i integrating the new script tag, i no longer have the console warn anymore but there is nothing in the html either, i have the iframes but empty also without any messages.
i tried to had a custom edit button from the doc with the id of the document without success.
Hello, @marc.arnoult Welcome to the community forum!
Have you already enabled and configured the Preview functionality? If you havenât done that first, here are the docs on how to do it: How to set up Previews.
Could you tell me where exactly are you adding the script for the Edit button and also share with me the code that youâre adding if possible
I tried with the previous script that in the previews setting page, and the vue lib to add the edit button without success either and with the vanilla doc to include a custom edit button too, but i canât see any change/error/warning anywhere.
However i can clearly see the div for the toolbar in the html or the iframe from prismic.
You need to include the EXACT script from the Previews section of your repository in the in the <head> of your project, in Vue this is done in the in the base index file.
If the script in your repository looks like this: <script type="text/javascript" src="https://static.cdn.prismic.io/prismic.min.js?repo=MARCS-REPO-NAME&new=true"></script>
Then all you need to do is run a query for a document in your views coming from Prismic and the toolbar will get the document id to create the new button.
If the script in your repository looks like this: <script type="text/javascript" src="https://static.cdn.prismic.io/prismic.min.js"></script>
Then your repository is using the old toolbar script and the new edit button will not work for you yet. If that is the case you have 2 choices:
To use the old edit button, insert a component on the pages where you do your query to the document from Prismic and pass the document ID as prop. <prismic-edit-button :documentId="documentId"/>
Let me know if this helps.
Thanks.
Fares
closed , flag & select 'Something Else' to reopen.
8