Alokai

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

NameRequiredTypeDescription
allowedOriginsOptionalstring[]A list of allowed origins for the live preview.
allowedOriginsAttributeNameOptionalstringThe attribute name for allowed origins.
onComponentUpdatedOptional(...args: any[]) => voidCallback to execute when the component is updated in SmartEdit.
pageRequiredRecord<string, any>A SmartEdit page object.
previewTokenParamNameOptionalstringName of the query parameter containing the SmartEdit preview token. 'cmsTicketId'
scriptIdOptionalstringUnique identifier for the webApplicationInjector script. 'smartedit-injector'
scriptSrcOptionalstringPath to the webApplicationInjector script.

On this page