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

(Feature request) Disable text selection in mermaid diagrams? #468

Open
dousha opened this issue Oct 10, 2024 · 1 comment
Open

(Feature request) Disable text selection in mermaid diagrams? #468

dousha opened this issue Oct 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dousha
Copy link

dousha commented Oct 10, 2024

Describe feature

Some mermaid diagrams can be dragged around to navigate. However, dragging would also highlight text in the diagram. If the start point of dragging happened to be a part of the highlighted text, dragging would instead perform other actions (such as "search" in Edge).

It can be implemented using custom CSS:

.mermaid-render {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: auto;
}

I wonder if it would be better if it is added as a configurable option?

Additional Information

No response

@eliandoran
Copy link

I think a good approach here would be to add a checkbox similar to how Mermaid Live has: "Pan & Zoom", that toggles between text selection and panning+zooming.

@eliandoran eliandoran added the enhancement New feature or request label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants