Skip to content

Cannot apply custom css #3873

Closed
Closed

Description

@ewen-r

Description

Following the guide here, it should be possible to add a custom css theme file and then (I presume) it would be listed in the application theme menu.

Can you reproduce the issue?

  • Yes, 100%

Steps to reproduce

  1. Download example theme from here
  2. Copied the theme file to all likely locations:
    ~/.config/marktext/themes/export
    ~/.var/app/com.github.marktext.marktext/config/themes/export/
    ~/.var/app/com.github.marktext.marktext/config/marktext/themes/export/
    ~/.var/app/com.github.marktext.marktext/data/themes/export/
    ~/.var/app/com.github.marktext.marktext/data/marktext/themes/export/
    ~/.var/app/com.github.marktext.marktext/themes/export/
    ~/.var/app/com.github.marktext.marktext/marktext/themes/export/
  3. Start marktext
  4. Select Themes toolbar menu.
  5. Theme is not listed.

Expected behavior:
Custom theme should be listed.

Actual behavior:
Custom theme is NOT listed.

Versions

  • MarkText version: v0.17.1
  • Operating system: Ubuntu 22.04
  • Flatpak install

Activity

  1. extromedia commented on Nov 1, 2024

    @extromedia

    I was expecting the custom themes would work for editing (as a WYSIWYG), but I think they are only available for exporting.

    I installed the deb file on Ubuntu 22.04

    MarkText: v0.17.1
    Node.js: 16.5.0
    Electron: 15.4.0
    Chromium: 94.0.4606.81
    OS: Linux x64 6.8.0-45-generic
    Screenshot from 2024-11-01 02-13-33

  2. added
    🐛 bug
    🪲 pri/major
    on May 13, 2026
  3. Jocs commented on Jul 5, 2026

    @Jocs
    Member

    Thanks for the detailed report, and @extromedia for confirming the same behavior. You're both right that themes/export/ is export-only — it's scanned by the Export dialog to build the PDF/HTML/styled-HTML output (see the Export Themes docs), and was never meant to feed the main window's 'Theme' menu, which only lists MarkText's built-in editor UI themes.

    The good news is that custom CSS for the editor itself is already supported, just through a different door: open Preferences > Theme and scroll down to the 'Custom CSS' box. Anything you paste there is applied live to the whole app, including the WYSIWYG editor - so you can use it to restyle the editor the way you were hoping the export theme file would. There's no file-drop workflow for it today, but pasting the contents of a theme CSS file into that box works.

    Closing since custom-CSS-for-the-editor already exists via Preferences > Theme > Custom CSS, and themes/export intentionally stays export-only. Feel free to reopen if that field doesn't do what you need!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 pri/major🐛 bug🔭 area/ui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions