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

How to pass mermaid RunOptions.suppressErrors=false while rendering mermaid component #496

Closed
aface-1916 opened this issue Nov 30, 2023 · 1 comment · Fixed by #560
Closed

Comments

@aface-1916
Copy link

I want to suppress mermaid rendering error by passing RunOptions.suppressErrors=false in MermaidAPI class.
But I know to how to pass this flag, I have the following code in my application

MermaidDemo.html

<span     
       markdown
      ngPreserveWhitespaces
      clipboard
      mermaid
      [mermaidOptions]="mermaidOptions"
      [data]="message"
     ></span>
MermaidDemo.ts

  public mermaidOptions: MermaidAPI.Config = {
    fontFamily: '"trebuchet ms", verdana, arial, sans-serif',
    logLevel: MermaidAPI.LogLevel.Info
  };
@jfcere
Copy link
Owner

jfcere commented Nov 20, 2024

Mermaid has been updated to expose the suppressErrorRendering through the mermaidOptions and I added the possibility to configure the options globally.

Those changes have been released as part of v19.0.0 alongside the update to Angular 19.

Please read the breaking changes carefully, new version of ngx-markdown uses marked v15 and needs some adjustments, as well as changes to the mermaid plugin.

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

Successfully merging a pull request may close this issue.

2 participants