6

I am using mermaid 8.5.0 to generate flowchart, but getting error message Maximum Text Size In Diagram Exceeded.

Saved MD to text document and size of document is 60kb.

So wanted to find out if there is any configuration which can allow to accept larger md text?

If there is any hard limit to markdown then what is it?

Rajnikant
  • 2,176
  • 24
  • 23

1 Answers1

11

There is a default limit on the size of the text used to generate the diagrams, 50000 characters.

Fortunately this default can be overridden when initializing mermaid:

mermaid.initialize({
  maxTextSize: 90000
});

I assume that the reason for the default is that it prevents very complex diagrams from causing performance problems due to high CPU usage in the browser, so I would try and keep the maximum as low as possible still.

tony19
  • 125,647
  • 18
  • 229
  • 307
Tom Robinson
  • 8,348
  • 9
  • 58
  • 102