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

Add underlined text to nodes #1892

Closed
amingilani opened this issue Feb 12, 2021 · 3 comments
Closed

Add underlined text to nodes #1892

amingilani opened this issue Feb 12, 2021 · 3 comments
Labels
Graph: Flow Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@amingilani
Copy link

amingilani commented Feb 12, 2021

Is your feature request related to a problem? Please describe.

When I'm trying to draw ERD diagrams for a course, using the symbols described in the Fundamentals of Database System. The elements are different from the ERD diagram in mermaid.js, so I revert to using the flowchart.

However, I need an underlined node to denote a primary key, but mermaid.js doesn't support underlined nodes

Describe the solution you'd like
Allow underlined nodes

Describe alternatives you've considered

  1. I tried added <u></u> tags. Here's what happened:
graph TD
    User[User]
    User --> ID(<u>ID/u>)
    User --> Email(Email)
    User --> Password(Password)

Screen Shot 2021-02-12 at 5 24 01 PM

  1. I've also tried adding styles, as per Styling the text in the elements of a flowchart mermaidjs/mermaidjs.github.io#8
graph TD
    User[User]
    User --> ID(ID)
    User --> Email(Email)
    User --> Password(Password)
    style ID  text-decoration: underline

The result is the same as the previous image.

@amingilani amingilani added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Feb 12, 2021
@wagle
Copy link

wagle commented Oct 20, 2021

The problem with the SVG that mermaid generates is that it tries to kludge in some of the style (here "text-decoration: underline") with "!important" instead of doing the CSS correctly. I guess I'll have to re-read those articles on this.

The SVG can be hand edited to force the underlining. So it isn't impossible.

CSS !important: Don’t Use It. Do This Instead

@math-GH
Copy link

math-GH commented Feb 3, 2022

1. I tried added `<u></u>` tags. Here's what happened:
graph TD
    User[User]
    User --> ID(<u>ID/u>)
    User --> Email(Email)
    User --> Password(Password)

Could you please try a valid HTML </u>?

@sidharthv96
Copy link
Member

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph: Flow Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants