I see in the Docs these 2 flags, but i can’t find any explanation or an API reference of them.
So what does isEditing mean?
What does isPreviewing mean?
And what’s the difference between them?
I see in the Docs these 2 flags, but i can’t find any explanation or an API reference of them.
So what does isEditing mean?
What does isPreviewing mean?
And what’s the difference between them?
isEditing
only applies when the site is loaded inside the editor iframe
. isPreviewing
applies in this case, as well as when looking at a draft preview outside the editor (i.e. Preview → View current draft).
This works by reading specific search params from the URL, you can see this in the implementation of the Builder
class (node_modules/@builder.io/sdk/dist/src/builder.class.js:1656
)