Skip to content

Improve dark mode support for editor and preview#1413

Open
TeaTinyTool wants to merge 1 commit into
prasathmani:masterfrom
TeaTinyTool:improve-dark-mode-editor-and-preview
Open

Improve dark mode support for editor and preview#1413
TeaTinyTool wants to merge 1 commit into
prasathmani:masterfrom
TeaTinyTool:improve-dark-mode-editor-and-preview

Conversation

@TeaTinyTool

Copy link
Copy Markdown

Summary

This improves dark mode support for the ACE editor and the file preview.

Problem

The TinyFileManager dark mode is currently not fully reflected in editor and preview views:

  • The ACE editor always starts with its default TextMate theme.
  • The file preview always loads the light Highlight.js style from $highlightjs_style.
  • Plain text previews without Highlight.js do not receive a dark mode style.

Changes

  • Use TextMate as the ACE theme in TinyFileManager light mode.
  • Use Twilight as the ACE theme in TinyFileManager dark mode.
  • Keep the existing manual ACE theme selector usable.
  • Add a new $highlightjs_style_dark setting next to $highlightjs_style.
  • Use $highlightjs_style in light mode.
  • Use $highlightjs_style_dark in dark mode.
  • Set the default dark Highlight.js style to vs2015.
  • Apply a dark background and light text color to plain text previews without Highlight.js.

Expected behavior

  • In light mode, editor and preview keep their current light appearance.
  • In dark mode, ACE and file preview start with a matching dark appearance.
  • Users can still manually change the ACE editor theme.

Make the ACE editor and file preview follow the current TinyFileManager theme.

Dark mode now uses a matching ACE theme and a separate Highlight.js style for previews, while light mode keeps the existing behavior. Plain text previews without Highlight.js also receive dark mode styling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant