imzbf / md-editor-v3

Markdown editor for vue3, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...
https://imzbf.github.io/md-editor-v3
MIT License
1.69k stars 162 forks source link

`mermaid@11.x`图表无法正常显示文字 #688

Closed nijinekoyo closed 2 months ago

nijinekoyo commented 2 months ago

描述这个Bug

在使用外部依赖引入mermaid后,图表无法正常显示文字 image

<template>
        <md-editor v-model="text" autoDetectCode noIconfont :toolbars="toolbar" :style="{ height: height }">
        </md-editor>
</template>

<script setup lang="ts">
...
import { config, MdEditor } from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
import mermaid from 'mermaid';

config({
    // 替换扩展库
    editorExtensions: {
        mermaid: {
            instance: mermaid
        }
    }
    ...
});

...
</script>

版本号

node: v20.5.1 md-editor-v3: 4.20.2 mermaid: 11.2.1

问题重现链接

No response

imzbf commented 2 months ago

mermaid@11存在问题,参考这个 https://github.com/mermaid-js/mermaid/issues/5904 解决,等等mermaid官方修复。没有特殊要求的话,建议使用mermaid@10

nijinekoyo commented 2 months ago

原来是这样,我在mermaid的ieeues搜no text没搜到所以还以为是这边的问题(