Did you follow the troubleshooting guide? [Y/N]
Y - Tested in sandbox vault with no plugins, no CSS snippets, and default theme
Expected result
Either:
- The diagram should render regardless of size, OR
- There should be a configuration option to increase the maxTextSize limit (similar to how standalone Mermaid.js allows
mermaid.initialize({ maxTextSize: 100000 }))
Actual result
The diagram fails to render and displays: “Maximum text size in diagram exceeded”
There is no way to configure or override this limit in Obsidian settings, frontmatter, or through any other means.
Environment
SYSTEM INFO:
Obsidian version: v1.8.10
Installer version: v1.8.4
Operating system: Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 23.5.0
Login status: logged in
Language: en
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
Additional information
- This is a limitation of the built-in Mermaid implementation in Obsidian
- The Mermaid.js library has a default maxTextSize of 50,000 characters which can be configured in standalone implementations
- This affects users working with large, complex diagrams for technical documentation
- Since Mermaid is built into Obsidian (not a plugin), users cannot work around this limitation
- Other Mermaid limits like maxEdges have been discussed in the forum, but maxTextSize hasn’t been addressed yet
Suggested solution: Add a configuration option in Settings > Editor or allow frontmatter configuration like:
---
mermaid:
maxTextSize: 1_000_000
---
