]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/markdown-editor.js
Fixed 'interaction_required' response for azure
[bookstack] / resources / js / components / markdown-editor.js
index 331cf2f01a9321d77d742eadd51cdc0ad77f1608..25d6bde47aa9771b2fef3fbff890f51121dd0809 100644 (file)
@@ -76,6 +76,7 @@ class MarkdownEditor {
                 return;
             }
             if (action === 'insertDrawing') this.actionStartDrawing();
+            if (action === 'fullscreen') this.actionFullScreen();
         });
 
         // Mobile section toggling
@@ -480,6 +481,13 @@ class MarkdownEditor {
         });
     }
 
+    // Make the editor full screen
+    actionFullScreen() {
+        const alreadyFullscreen = this.elem.classList.contains('fullscreen');
+        this.elem.classList.toggle('fullscreen', !alreadyFullscreen);
+        document.body.classList.toggle('markdown-fullscreen', !alreadyFullscreen);
+    }
+
     // Scroll to a specified text
     scrollToText(searchText) {
         if (!searchText) {