Visual editing not working on first load #881
Labels
pending-author
[Issue] Awaiting further information or action from the issue author
pending-triage
[Issue] Ticket is pending to be prioritised
Describe the issue you're facing
I am having trouble getting visual editing to work on first load with SSG.
I followed the tutorial here to create a fully static preview environment: https://www.storyblok.com/tp/create-a-preview-environment-for-your-nuxt-3-website
When in the Storyblok editor, visual editing does not work when it's first loaded. If I make any change in the editor though, the bridge correctly updates everything and after that update, visual editing works as expected.
The problem seems to be in the
v-editable
composable not adding the necessary attributes on first load for some reason. I tried creating my own custom directive and found thatbinding.value
does not have the_editable
property needed to add these attributes, which I think means that the bridge is not initialized yet.Does anyone know why the bridge isn't initializing correctly on first load?
Here is my preview.js:
And the composable I'm using to fetch stories:
Reproduction
Not possible
Steps to reproduce
No response
System Info
Used Package Manager
pnpm
Error logs (Optional)
No response
Validations
The text was updated successfully, but these errors were encountered: