diff --git a/apps/web/src/pages/___editor_preview.tsx b/apps/web/src/pages/___editor_preview.tsx index d8c5f5e66c..edfec5e8c3 100644 --- a/apps/web/src/pages/___editor_preview.tsx +++ b/apps/web/src/pages/___editor_preview.tsx @@ -105,7 +105,7 @@ function Content() { value={{ editorVariant: 'serlo-org', userId: 'serlo-preview-user' }} >
-
+

Edit

@@ -153,7 +153,7 @@ function Content() {
{editor}
-
+

Preview

diff --git a/packages/editor/src/core/editor.tsx b/packages/editor/src/core/editor.tsx index daccd146d0..23f1de76b8 100644 --- a/packages/editor/src/core/editor.tsx +++ b/packages/editor/src/core/editor.tsx @@ -31,6 +31,10 @@ export function Editor(props: EditorProps) { // New store for every editor instance const store = useMemo(() => createStore(), []) + const isSerloEditorPreviewPage = + window?.location?.href && + window?.location?.href.includes('___editor_preview') + return ( @@ -38,7 +42,7 @@ export function Editor(props: EditorProps) { {/* only on serlo for now */} {isSerlo ? ( <> - + {isSerloEditorPreviewPage ? null : }