diff --git a/src/Squidex/app/framework/angular/markdown-editor.component.html b/src/Squidex/app/framework/angular/markdown-editor.component.html
index e37c91756..b6efd8dc8 100644
--- a/src/Squidex/app/framework/angular/markdown-editor.component.html
+++ b/src/Squidex/app/framework/angular/markdown-editor.component.html
@@ -1 +1,5 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Squidex/app/framework/angular/markdown-editor.component.scss b/src/Squidex/app/framework/angular/markdown-editor.component.scss
index 38eac8026..834b5b55c 100644
--- a/src/Squidex/app/framework/angular/markdown-editor.component.scss
+++ b/src/Squidex/app/framework/angular/markdown-editor.component.scss
@@ -1,6 +1,15 @@
@import '_mixins';
@import '_vars';
+$background: #fff;
+
.editor {
height: 30rem;
+}
+
+.fullscreen {
+ @include fixed(0, 0, 0, 0);
+ border: 0;
+ background: $background;
+ z-index: 100000;
}
\ No newline at end of file
diff --git a/src/Squidex/app/framework/angular/markdown-editor.component.ts b/src/Squidex/app/framework/angular/markdown-editor.component.ts
index dd74c6af7..3bbbe4184 100644
--- a/src/Squidex/app/framework/angular/markdown-editor.component.ts
+++ b/src/Squidex/app/framework/angular/markdown-editor.component.ts
@@ -35,6 +35,14 @@ export class MarkdownEditorComponent implements ControlValueAccessor, AfterViewI
@ViewChild('editor')
public editor: ElementRef;
+ @ViewChild('container')
+ public container: ElementRef;
+
+ @ViewChild('inner')
+ public inner: ElementRef;
+
+ public isFullscreen = false;
+
constructor(
private readonly resourceLoader: ResourceLoaderService
) {
@@ -75,6 +83,16 @@ export class MarkdownEditorComponent implements ControlValueAccessor, AfterViewI
this.changeCallback(value);
});
+
+ this.simplemde.codemirror.on('refresh', () => {
+ this.isFullscreen = this.simplemde.isFullscreenActive();
+
+ if (this.isFullscreen) {
+ document.body.appendChild(this.inner.nativeElement);
+ } else {
+ this.container.nativeElement.appendChild(this.inner.nativeElement);
+ }
+ });
});
}
}
\ No newline at end of file