[GH-ISSUE #1171] Config theme and font size [enhancement] #753

Open
opened 2026-03-02 16:01:13 +03:00 by kerem · 4 comments
Owner

Originally created by @nerun on GitHub (May 6, 2024).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1171

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.

Originally created by @nerun on GitHub (May 6, 2024). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1171 I know that i can change default theme in TFM 2.5.3 by editing line 4168. lines 4165-9: ```php <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: ```php $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`.
Author
Owner

@prasathmani commented on GitHub (May 7, 2024):

Thank you, @nerun, for your suggestion. We will take it into consideration for inclusion in a future release.

<!-- gh-comment-id:2097347653 --> @prasathmani commented on GitHub (May 7, 2024): Thank you, @nerun, for your suggestion. We will take it into consideration for inclusion in a future release.
Author
Owner

@awais300 commented on GitHub (Jun 23, 2024):

@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!

<!-- gh-comment-id:2185092805 --> @awais300 commented on GitHub (Jun 23, 2024): @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!
Author
Owner

@nerun commented on GitHub (Jun 23, 2024):

Works like a charm

<!-- gh-comment-id:2185097466 --> @nerun commented on GitHub (Jun 23, 2024): Works like a charm
Author
Owner

@nerun commented on GitHub (Jun 24, 2024):

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.

<!-- gh-comment-id:2186502951 --> @nerun commented on GitHub (Jun 24, 2024): ## 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#753
No description provided.