From 66f87d16e304dc7d4ccf1b06c40dc152abb08335 Mon Sep 17 00:00:00 2001 From: Frederic Salmen <4583669+salmenf@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:55:41 +0100 Subject: [PATCH] Fix preview mode --- @webwriter/core/view/editor/prosemirroreditor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/@webwriter/core/view/editor/prosemirroreditor.ts b/@webwriter/core/view/editor/prosemirroreditor.ts index cb3a393..5b62ac6 100644 --- a/@webwriter/core/view/editor/prosemirroreditor.ts +++ b/@webwriter/core/view/editor/prosemirroreditor.ts @@ -275,6 +275,9 @@ export class ProsemirrorEditor extends LitElement implements IProsemirrorEditor } async initialize() { + if(this.url) { + return this.initializePreviewFrame() + } await this.initializeIFrame() this.view?.destroy() this.view = new EditorView({mount: this.body}, this.directProps)