Typora 适配高版本 Mermaid
查看 Mermaid 版本
info下载最新的 mermaid.min.js文件
在搜索框输入 CDN
https://cdn.jsdelivr.net/npm/mermaid@11/
替换 Typora 的 window.html 文件
<script>
const interval = setInterval(() => {
console.log('check mermaid...');
if (window.editor &&
window.editor.diagrams &&
window.mermaidAPI) {
$.getScript('file:///E:/Typora/Typora/resources/mermaid.min.js')
.then(() => {
mermaidAPI = mermaid.mermaidAPI;
editor.diagrams.refreshDiagram(editor);
clearInterval(interval);
});
}
}, 100);
</script>
标签:适配,Typora,window,Mermaid,mermaid,editor
From: https://www.cnblogs.com/aclq/p/18393748