@contentful/live-preview
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -6,3 +6,3 @@ import { FieldTagging } from './fieldTagging'; | ||
debugMode?: boolean; | ||
enableFieldTagging?: boolean; | ||
enableInspectorMode?: boolean; | ||
enableLiveUpdates?: boolean; | ||
@@ -15,3 +15,3 @@ } | ||
static liveUpdatesEnabled: boolean; | ||
static init({ debugMode, enableFieldTagging, enableLiveUpdates }?: ContentfulLivePreviewInitConfig): Promise<FieldTagging | null> | undefined; | ||
static init({ debugMode, enableInspectorMode, enableLiveUpdates }?: ContentfulLivePreviewInitConfig): Promise<FieldTagging | null> | undefined; | ||
static subscribe(data: Argument, locale: string, callback: SubscribeCallback): VoidFunction; | ||
@@ -18,0 +18,0 @@ static getProps({ fieldId, entryId, locale, }: LivePreviewProps): Record<TagAttributes, string | null | undefined>; |
@@ -1,2 +0,2 @@ | ||
import { C as r } from "./index-7eac4424.js"; | ||
import { C as r } from "./index-0a5c53eb.js"; | ||
export { | ||
@@ -3,0 +3,0 @@ r as ContentfulLivePreview |
import * as f from "react"; | ||
import { useState as v, useRef as c } from "react"; | ||
import { d as o, C as g } from "./index-7eac4424.js"; | ||
import { d as o, C as g } from "./index-0a5c53eb.js"; | ||
var l = Object.prototype.hasOwnProperty; | ||
@@ -5,0 +5,0 @@ function p(e, t, n) { |
{ | ||
"name": "@contentful/live-preview", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"author": "Contentful GmbH", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
# @contentful/live-preview | ||
> **Warning:** This package is currently in an **ALPHA** state (i.e., not suitable for production use and subject to breaking changes). | ||
Preview SDK for both the field tagging connection + live content updates by [Contentful](https://www.contentful.com/). | ||
@@ -29,2 +27,4 @@ | ||
- [Developer Documentation](https://www.contentful.com/developers/docs/tutorials/general/live-preview/) | ||
### Initializing the SDK | ||
@@ -52,3 +52,3 @@ | ||
ContentfulLivePreview.init({ | ||
enablefieldTagging: false, // This allows you to toggle the inspector mode which is on by default | ||
enableInspectorMode: false, // This allows you to toggle the inspector mode which is on by default | ||
enableLiveUpdates: false, // This allows you to toggle the live updates which is on by default | ||
@@ -59,5 +59,5 @@ debugMode: false, // This allows you to toggle the debug mode which is off by default | ||
### Field Tagging | ||
### Inspector Mode (field tagging) | ||
To tag fields you need to add the live preview data-attributes (`data-contentful-entry-id`, `data-contentful-field-id`, `data-contentful-locale`) to the rendered HTML element output. | ||
To use the inspector mode, you need to tag fields by adding the live preview data-attributes (`data-contentful-entry-id`, `data-contentful-field-id`, `data-contentful-locale`) to the rendered HTML element output. | ||
You can do this in React via our helper function. | ||
@@ -64,0 +64,0 @@ The necessary styles for the live edit tags can be found in the '@contentful/live-preview/style.css' file. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
200340