Config theme and font size [enhancement]
I know that i can change default theme in TFM 2.5.3 by editing line 4168.
lines 4165-9:
<script>
var editor = ace.edit("editor");
editor.getSession().setMode( {path:"ace/mode/<?php echo $ext; ?>", inline:true} );
//editor.setTheme("ace/theme/twilight"); //Dark Theme
editor.setShowPrintMargin(false); // Hide the vertical ruler
And to change default font size, edit line 4183:
$themeEl.val( editor.getTheme() );
$fontSizeEl.val(12).change(); //set default font size in drop down
}
PS.: change default font size do not render in the new size, but always in font 12. If you set to 18, ace will open in 12, but shows 18.
It works well, but would be better if there is a variable to change in config.php for both default theme and font size.
Thank you, @nerun, for your suggestion. We will take it into consideration for inclusion in a future release.
@nerun to adjust the font size, please use the following updated code:
Replace this:
$fontSizeEl.val(12).change(); // set default font size in dropdown
with this:
$(function() { $fontSizeEl.val(18).change(); }); //set default font size in drop down
@prasathmani I have submitted a pull request https://github.com/prasathmani/tinyfilemanager/pull/1200. Please review it at your earliest convenience. Thank you!
Works like a charm
Please, reopen it
This issue is about add variables to change theme and font size in config.php, the same way that happens in other settings. PR #1200 just resolve font size not changing when editing tinyfilemanager.php directly. For example, if i could add these to config.php:
$EDITOR_FONTSIZE = 12;
$EDITOR_THEME = "ace/theme/textmate";
Would be easier.