mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
feat(editor): add mermaid code preview (#13456)
<img width="971" height="681" alt="iShot_2025-08-10_14 29 01" src="https://github.com/user-attachments/assets/eff3e6d5-3129-42ac-aceb-994c18f675ab" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Mermaid diagram previews for code blocks with interactive zoom, pan, and reset controls. * Improved rendering feedback with loading, error states, retry behavior, and fallback messaging. * **Chores** * Added Mermaid as a frontend dependency to enable diagram rendering. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: L-Sun <zover.v@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@ export const useAISpecs = () => {
|
||||
.mobile(framework)
|
||||
.electron(framework)
|
||||
.linkPreview(framework)
|
||||
.codeBlockHtmlPreview(framework).value;
|
||||
.codeBlockPreview(framework).value;
|
||||
|
||||
return manager.get('page');
|
||||
}, [
|
||||
|
||||
Reference in New Issue
Block a user