From 1bfe3652c5951574112a98e24d389a68e4f72217 Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Sat, 1 Mar 2025 08:59:03 +0000 Subject: [PATCH] Resize editor to adjust to window size. Otherwise the editor pane is typically way to small. --- webapp/src/Twig/TwigExtension.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webapp/src/Twig/TwigExtension.php b/webapp/src/Twig/TwigExtension.php index f66a0acff9..2ea4b2388b 100644 --- a/webapp/src/Twig/TwigExtension.php +++ b/webapp/src/Twig/TwigExtension.php @@ -849,6 +849,10 @@ public function codeEditor( const element = document.getElementById('__EDITOR__'); const content = element.textContent; element.textContent = ''; + // Adjust editor height to fit window. + const height = $(window).height() - 400; + element.style.height = height + 'px'; + const editor = monaco.editor.create(element, { value: content, scrollbar: {