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

View-Mode: Prism codeblock copy to clipboard button, update Mermaid and dark mode, closes #2336 closes #2335 #2345

Merged
merged 8 commits into from
Jul 16, 2024

Conversation

guanglinn
Copy link
Contributor

@guanglinn guanglinn commented Jul 11, 2024

This PR is related to the discussion #2336 and the issue #2335.

In this PR:

  1. Add a button to copy the code block;
  2. Support applying dark theme for Mermaid diagrams;
  3. Update Mermaid from v10.3.1 to v10.9.1;
  4. Add a basic keyboard shortcut Ctrl+Y to redo.

@guanglinn
Copy link
Contributor Author

guanglinn commented Jul 11, 2024

This is the option to copy code with one click in the code block, see #2336. The implementation of this feature refers to Copy to Clipboard ▲ Prism plugins.

Light theme

2024-07-11-copy-code-block-with-one-click

Dark theme

2024-07-11-copy-code-block-with-one-click-dark

@guanglinn
Copy link
Contributor Author

guanglinn commented Jul 11, 2024

Now Markor can apply dark theme correctly for Mermaid diagrams, see #2335.

Light theme

2024-07-16-mermaid-light

Dark theme

2024-07-16-mermaid-dark

@harshad1
Copy link
Collaborator

Very nice

@guanglinn
Copy link
Contributor Author

guanglinn commented Jul 12, 2024

Mermaid v10.9.1 is stable, its changelog can be seen here.

The file mermaid.min.js is from https://registry.npmjs.org/mermaid/-/mermaid-10.9.1.tgz in the website https://www.jsdelivr.com/package/npm/mermaid.

@gsantner gsantner linked an issue Jul 16, 2024 that may be closed by this pull request
4 tasks
@gsantner gsantner changed the title Add support for copying code block with one click View-Mode: Prism codeblock copy to clipboard button, update Mermaid and dark mode, closes #2336 closes #2335 Jul 16, 2024
@gsantner gsantner added this to the Markor v2.12 milestone Jul 16, 2024
Copy link
Owner

@gsantner gsantner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@gsantner gsantner merged commit 321f9b7 into gsantner:master Jul 16, 2024
1 check passed
@gsantner gsantner modified the milestones: Markor v2.12, Markor v2.13 Jul 16, 2024
@guanglinn guanglinn deleted the copy_code_block branch July 17, 2024 00:14
elyahw pushed a commit to writing-tools/marelias-notepad that referenced this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markdown: Mermaid chart dark mode?
3 participants