Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes setting drop down boxes to the current ace editor mode and theme on page load.
  • Loading branch information
zachlankton committed Jul 20, 2020
1 parent de7479f commit 78d45e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tinyfilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3891,6 +3891,8 @@ function renderThemeMode() {
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("<optgroup label=\"Bright\">"+lightTheme+"</optgroup><optgroup label=\"Dark\">"+darkTheme+"</optgroup>");}
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
}

Expand Down

0 comments on commit 78d45e9

Please sign in to comment.