Commit 9b3d97f0 authored by Dheeraj Joshi's avatar Dheeraj Joshi

Fix styling issues for mermaid diagrams

This fixes styling issue for sandboxed mermaid
diagram by setting full width for iframe.
parent b48e79a9
...@@ -117,9 +117,9 @@ function renderMermaidEl(el, source) { ...@@ -117,9 +117,9 @@ function renderMermaidEl(el, source) {
if (event.origin !== 'null' || event.source !== iframeEl.contentWindow) { if (event.origin !== 'null' || event.source !== iframeEl.contentWindow) {
return; return;
} }
const { h, w } = event.data; const { h } = event.data;
iframeEl.width = w; iframeEl.width = '100%';
iframeEl.height = h; iframeEl.height = `${h + 10}px`;
}, },
false, false,
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment