appendLivePreviewParams
appendLivePreviewParams(
props):string
Defined in: packages/core/src/livePreview/constants.ts:160
Appends the params that turn a public URL into a preview request.
Lives in core, not beside the panel, because BOTH sides need it: the browser
resolving a string/client url, and NextAdminPage resolving a { server }
one. Skipping it produces a URL that loads a perfectly normal page which
listens to nothing — a silent failure, which is exactly what happened when
the server-resolved path had its own un-appended copy.
Parameters
Section titled “Parameters”collectionSlug
Section titled “collectionSlug”string
The collection or global being previewed.
tempId?
Section titled “tempId?”string
The temp id, only while the document is unsaved.
string
The resolved public URL.
Returns
Section titled “Returns”string
The URL with vexLivePreview=1 and, when unsaved, the temp-id params.