diff --git a/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js b/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js index ed0e77026..bed3f3132 100644 --- a/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js +++ b/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js @@ -18,7 +18,7 @@ function mermaidInit() { // Resetting elements size - see mermaid.ts const elements = document.getElementsByClassName('mermaid'); for (const element of elements) { - element.style.width = 'fit-content'; + element.style.width = '100%'; } } } diff --git a/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js b/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js index 52bc065c0..bed3f3132 100644 --- a/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js +++ b/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js @@ -15,6 +15,7 @@ function mermaidInit() { console.error('Mermaid error', error); } + // Resetting elements size - see mermaid.ts const elements = document.getElementsByClassName('mermaid'); for (const element of elements) { element.style.width = '100%';