InitLivePreviewProps
Configuration options for the initLivePreview() function.
interface InitLivePreviewProps {
allowedOrigins?: string[];
allowedOriginsAttributeName?: string;
onComponentUpdated?: (...args: any[]) => void;
page: Record<string, any>;
previewTokenParamName?: string;
scriptId?: string;
scriptSrc?: string;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
allowedOrigins | Optional | string[] | A list of allowed origins for the live preview. |
allowedOriginsAttributeName | Optional | string | The attribute name for allowed origins. |
onComponentUpdated | Optional | (...args: any[]) => void | Callback to execute when the component is updated in SmartEdit. |
page | Required | Record<string, any> | A SmartEdit page object. |
previewTokenParamName | Optional | string | Name of the query parameter containing the SmartEdit preview token. 'cmsTicketId' |
scriptId | Optional | string | Unique identifier for the webApplicationInjector script. 'smartedit-injector' |
scriptSrc | Optional | string | Path to the webApplicationInjector script. |