Skip to content

Commit e9b8eb5

Browse files
Merge pull request #292 from contentstack/VC-115/live-editor-support
chore: update readme
2 parents c3222d6 + 94891b9 commit e9b8eb5

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ npm install @contentstack/live-preview-utils
1515
Alternatively, if you want to include the package directly in your website HTML code, use the following command:
1616

1717
```html
18-
<script type='module' integrity='sha384-lCmcVfWM6NvgMmsDlPZYYJ9MwFk9oDU3WhsJ3KmUJPWa7iKvIuYl+XzTl+cOCuim' crossorigin="anonymous">
19-
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@2.0.4';
18+
<script type='module' integrity='sha384-9M4o9H23Ax5ZTzsMRLgdlFBYk2hy+ub6XDiZhHWJjfebQ+MZ9iZw+GNep9ac0uFV' crossorigin="anonymous">
19+
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@3.0.0';
2020
2121
ContentstackLivePreview.init({
2222
stackDetails: {

src/livePreview/eventManager/postMessageEvent.hooks.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ export function sendInitializeLivePreviewPostMessageEvent(): void {
7777
windowType = ILivePreviewWindowType.PREVIEW,
7878
} = data || {};
7979

80+
// TODO: This is a fix for the issue where we were calling sending init in the builder
81+
// Let's remove this condition when we fix it.
82+
if (Config?.get()?.windowType && Config.get().windowType === ILivePreviewWindowType.BUILDER) {
83+
return;
84+
}
85+
8086
if (contentTypeUid && entryUid) {
8187
// TODO: we should not use this function. Instead we should have sideEffect run automatically when we set the config.
8288
setConfigFromParams({

0 commit comments

Comments
 (0)