Prismic-edit-button is not in prismic-vue

i try to use the prismic-edit-button like in
But the component can not be found and i use:
"prismic-vue": "^2.0.1",

Can somebody help me please? Thank you in advanced!

Hi Stefan,

Thanks for posting :blush: The prismic-edit-button component is a deprecated feature. It's still in the documentation because it might still be used in older projects. Now, the edit button is loaded automatically as an iframe with the preview tool bar. The new implementation is much easier to set up.

In Prismic, go to Settings > Previews. If the url for the script src includes ?new=true, then your preview script will load the edit button automatically. Just follow the instructions for setting up previews, and you'll get the edit button.

Please let me know if you have any questions!


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

I use gridsome js to generate 100% static sites with the cms data. And i have just one dynamic page...for handling the prismic preview request. Its just use the same ui components like the static ui generation with realtime requests. At the static sites the preview toolbar can not recognize the document at runtime. Thats why i wanted to add a editbutton with documentid. Or is there a other solution?
Thank you for your help

Hi Stefan,

If you're just trying to get the edit button, and you don't need help getting preview functionality working, there is a workaround that might do the trick:

The preview script watches the page for an API call to your Prismic repo, and then generates a list of the Prismic documents returned by that call. To mimic this behavior with Gridsome, you could simply add a redundant API call requesting the content that appears on the page. Even though that API response won't get rendered, the toolbar script should recognize it and display the list of documents.

Otherwise, I don't know of any way to set up previews with Gridsome. If that workaround doesn't work, let me know and I'll ask my team about other options.