From 65f7dc448dd220c0de0bd3956cc6b9d907606220 Mon Sep 17 00:00:00 2001 From: zachlankton Date: Sun, 19 Jul 2020 20:07:41 -0400 Subject: [PATCH] Fixes #183, Fixes #289 (#400) Fixes setting drop down boxes to the current ace editor mode and theme on page load. --- tinyfilemanager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 5df073f..3e59f94 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -3891,6 +3891,8 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal'; if(_data && _data.aceMode) { $modeEl.html(optionNode("ace/mode/", _data.aceMode)); } if(_data && _data.aceTheme) { var lightTheme = optionNode("ace/theme/", _data.aceTheme.bright), darkTheme = optionNode("ace/theme/", _data.aceTheme.dark); $themeEl.html(""+lightTheme+""+darkTheme+"");} if(_data && _data.fontSize) { $fontSizeEl.html(optionNode("", _data.fontSize)); } + $modeEl.val( editor.getSession().$modeId ); + $themeEl.val( editor.getTheme() ); $fontSizeEl.val(12).change(); //set default font size in drop down }