JavaScript loader in collapsed admonition + details #1912
-
I am using this plugin https://github.com/onixpro/mkdocs-drawio-file/ and have a problem where it refuses to load in a collapsed admonition, only in Firefox. I really had no idea where the issue was/is so opened issues on the plugin and material theme (but it's nothing to do with material) onixpro/mkdocs-drawio-file#3 Then I came across this thread for mermaid fralau/mkdocs-mermaid2-plugin#8 and, clutching at straws, I am just wondering if there is a possibility my issue is somehow related? It's just Firefox and collapsed admonitions
If you have any insight I'd appreciate it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This has nothing to do with how admonitions or details are generated. There is no bug in either of the plugins related to the problems you are having.. It appears that the drawio plugin expects the diagrams to be specified with links, neither admonitions or details will prevent the links from getting generated in the containers. So that leaves only one possibility, the loader that the drawio plugin links to has difficulty finding and rendering the diagrams in the closed containers. This is the loader: https://github.com/onixpro/mkdocs-drawio-file/blob/main/mkdocs_drawio_file/plugin.py#L67. Most likely this is an issue with the loader script, and that is probably upstream even from the MkDcos drawio plugin. Just an FYI, fralau/mkdocs-mermaid2-plugin#8 is not really relevant to what you are dealing with. There were issues related to how the Mermaid diagrams were stored, in divs. They were stored as raw text wrapped in a div and HTML minimizes could mess those up (or at least the popular one for MkDocs. I personally wrap mine in a code block and have my own personal loader to handle it, but drawio is using links making this approach irrelevant. Now, I'm not sure the exact reason the loader has trouble with details as I am not familiar with the approach they use, but I am certain if I can Mermaid working properly in details then the people maintaining the drawio loader script can probably get theirs working as well. |
Beta Was this translation helpful? Give feedback.
This has nothing to do with how admonitions or details are generated. There is no bug in either of the plugins related to the problems you are having..
It appears that the drawio plugin expects the diagrams to be specified with links, neither admonitions or details will prevent the links from getting generated in the containers. So that leaves only one possibility, the loader that the drawio plugin links to has difficulty finding and rendering the diagrams in the closed containers. This is the loader: https://github.com/onixpro/mkdocs-drawio-file/blob/main/mkdocs_drawio_file/plugin.py#L67.
Most likely this is an issue with the loader script, and that is probably upstream even from the MkD…