From e0e9598cae1d648875bc8f7e8023ce3c6df1b2dc Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Fri, 18 Oct 2024 12:28:49 +0200 Subject: [PATCH] Add OnlyofficeTools::getPathToView() to enable viewer in the learning path - fixes #41 --- editor.php | 17 ++++++++++-- lib/onlyofficeTools.php | 60 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/editor.php b/editor.php index 115b2b7..1a46589 100644 --- a/editor.php +++ b/editor.php @@ -69,11 +69,18 @@ $config = json_decode(json_encode($config), true); $isMobileAgent = $configService->isMobileAgent($_SERVER['HTTP_USER_AGENT']); +$showHeaders = true; +$headerHeight = 'calc(100% - 140px)'; +if (!empty($_GET['nh'])) { + $showHeaders = false; + $headerHeight = '100%'; +} + ?> ONLYOFFICE