Skip to content

Commit

Permalink
Merge pull request #92 from contentstack/EB-817-update-field-adds-div…
Browse files Browse the repository at this point in the history
…-element

fix: add windowType in the editor's init.
  • Loading branch information
Deepak-Kharah authored Jan 11, 2024
2 parents 9b9984f + 64c0616 commit a82b2a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/liveEditor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ export class VisualEditor {
this.appendVisualEditorDOM();

liveEditorPostMessage
?.send("init")
.then(() => {
Config.set("windowType", ILivePreviewWindowType.EDITOR);
?.send<{ windowType: ILivePreviewWindowType }>("init")
.then((data) => {
const { windowType = ILivePreviewWindowType.EDITOR } = data;
Config.set("windowType", windowType);
window.addEventListener(
"click",
this.handleMouseDownForVisualEditing
Expand Down

0 comments on commit a82b2a1

Please sign in to comment.