feat: 实现 Mermaid 插件兼容层
- 添加插件检测函数(WP Githuber MD、Markdown Block、Code Syntax Block) - 实现 Mermaid 库加载状态检测 - 添加重复加载防护逻辑,避免与插件冲突 - 在设置页显示插件兼容性状态 - 修改库加载逻辑,当检测到插件时跳过加载 - 在 JavaScript 端添加库加载状态标记 - Requirements: 9.1, 9.2, 9.3, 9.4, 9.5
This commit is contained in:
@@ -4350,12 +4350,18 @@ void 0;
|
||||
enabled: true,
|
||||
theme: 'auto',
|
||||
debugMode: false,
|
||||
fallbackUrls: []
|
||||
fallbackUrls: [],
|
||||
libraryLoadedByPlugin: false
|
||||
};
|
||||
} else {
|
||||
this.config = window.argonMermaidConfig;
|
||||
}
|
||||
|
||||
// 如果库由插件加载,记录日志
|
||||
if (this.config.libraryLoadedByPlugin) {
|
||||
this.logDebug('Mermaid 库由插件加载,主题只提供样式增强');
|
||||
}
|
||||
|
||||
// 获取当前主题
|
||||
const theme = this.getMermaidTheme();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user