Alokai

LivePreviewConfig

Custom Live Preview configuration to be used with the initLivePreview method.

It combines certain properties from the ContentfulLivePreviewInitConfig and ContentfulSubscribeConfig types. The custom configuration will be merged with the default one:

const defaultConfiguration = {
  locale: 'en-US',
  enableLiveUpdates: true,
  debugMode: false,
  enableInspectorMode: true,
  callback: (updatedData: any) => {
    Object.assign(data, updatedData);
  }
}
type LivePreviewConfig = Omit<ContentfulLivePreviewInitConfig, "locale"> & Omit<ContentfulSubscribeConfig, "data">;

Referenced Types

  • ContentfulLivePreviewInitConfig
  • ContentfulSubscribeConfig

On this page