Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting Dark Mode #5

Open
Hunanbean opened this issue Dec 6, 2022 · 4 comments
Open

Requesting Dark Mode #5

Hunanbean opened this issue Dec 6, 2022 · 4 comments

Comments

@Hunanbean
Copy link

If possible, please enable dark UI mode.

Thank you for enabling the use of Diagrams.net/draw.io in Obsidian for us.

@Hunanbean Hunanbean changed the title Requesting Dark Mode label:enhancement Requesting Dark Mode Dec 6, 2022
@Mat4m0
Copy link

Mat4m0 commented Jan 15, 2023

+1 This would also be on top of my list.

Also, big thank you from my side

@alterdaemon
Copy link

alterdaemon commented Feb 27, 2023

To get Dark Theme just change the line 20494 in main.js to

const ui = "&ui=dark";

done

@mrdotkg
Copy link

mrdotkg commented Aug 31, 2023

@alterdaemon this worked, thanks!
I tried const ui = "&ui=sketch";. Is it also possible to enable Dark Appearance on top of my selected Sketch Theme?
Like the desktop app for draw.io.

@Oberon-Zheng
Copy link

Oberon-Zheng commented Sep 23, 2023

To get Dark Theme just change the line 20494 in main.js to

const ui = "&ui=dark";

done

Thanks to @alterdaemon 's suggestion. It worked.

But I'd like to add a point:
const ui = "&ui=dark"; indeed change the interface display into dark, however it does nothing with the exported svg embedded in the note or canvas.

To let the svg follow theme, additionally we need to focus on the save & export logic from line 20524, and add another line:

_postMessage({
        action: "export",
        format: "svg",
        embedImages: true,
        //add this line
        keepTheme: true,
        exit: false,
      }

This let the exportion always follows the display once you save.

The plugin actually runs as an embedded instance, so I referenced the doc of diagrams.net: https://www.drawio.com/doc/faq/embed-mode#description-of-the-json-protocol
With this you can have more customizations.

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

No branches or pull requests

5 participants