Open 1103036128 opened 4 years ago
这边是否能支持下该插件
copy 他的源码过来 改改就好 https://www.npmjs.com/package/markdown-it-mermaid
------------------ 原始邮件 ------------------ 发件人: "alivnLG"<notifications@github.com>; 发送时间: 2020年3月24日(星期二) 上午9:39 收件人: "hinesboy/mavonEditor"<mavonEditor@noreply.github.com>; 抄送: "る過去旳承諾"<1103036128@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [hinesboy/mavonEditor] 通过markdown-it实例加载markdown-it-mermaid 插件无效 (#540)
import markdownItMermaid from 'markdown-it-mermaid' mounted() { const mdi = this.$refs.md.markdownIt mdi.use(markdownItMermaid) },
https://www.npmjs.com/package/markdown-it-mermaid
单独div 显示有效
代码:
<div class="mermaid"> sequenceDiagram participant Alice participant Bob Alice->John:Hello John, how are you? loop Healthcheck John->John:Fight against hypochondria end Note right of John:Rational thoughts John-->Alice:Great! John->Bob: How about you? Bob-->John: Jolly good! </div>
图片:
编辑器中的 代码:
preview:
发现preview 不会进行显示,能帮我看下吗。感谢!!
大神 这个你扩展成功了吗?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
------------------ 原始邮件 ------------------ 发件人: "alivnLG"<notifications@github.com>; 发送时间: 2020年3月24日(星期二) 上午9:49 收件人: "hinesboy/mavonEditor"<mavonEditor@noreply.github.com>; 抄送: "る過去旳承諾"<1103036128@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [hinesboy/mavonEditor] 通过markdown-it实例加载markdown-it-mermaid 插件无效 (#540)
copy 他的源码过来 改改就好 https://www.npmjs.com/package/markdown-it-mermaid … ------------------ 原始邮件 ------------------ 发件人: "alivnLG"<notifications@github.com>; 发送时间: 2020年3月24日(星期二) 上午9:39 收件人: "hinesboy/mavonEditor"<mavonEditor@noreply.github.com>; 抄送: "る過去旳承諾"<1103036128@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [hinesboy/mavonEditor] 通过markdown-it实例加载markdown-it-mermaid 插件无效 (#540) import markdownItMermaid from 'markdown-it-mermaid' mounted() { const mdi = this.$refs.md.markdownIt mdi.use(markdownItMermaid) }, https://www.npmjs.com/package/markdown-it-mermaid 单独div 显示有效 代码: <div class="mermaid"> sequenceDiagram participant Alice participant Bob Alice->John:Hello John, how are you? loop Healthcheck John->John:Fight against hypochondria end Note right of John:Rational thoughts John-->Alice:Great! John->Bob: How about you? Bob-->John: Jolly good! </div> 图片: 编辑器中的 代码: preview: 发现preview 不会进行显示,能帮我看下吗。感谢!! 大神 这个你扩展成功了吗? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
我是全局引入的 怎么修改能提示下不,第一次弄这个,感谢!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
请问调通了吗? 麻烦看一下,下面的方法对吗?为什么不行呢?
import markdownItMermaid from '../../plugins/markdown-it-mermaid-master/src/index.js'
export default { ..... ,mounted: function() { //const mdi = markdownIt() const mdi = this.$refs.md.markdownIt console.log("mounted:",mdi) mdi.use(markdownItMermaid)
}
https://www.npmjs.com/package/markdown-it-mermaid
图片:
编辑器中的
代码:
![image](https://user-images.githubusercontent.com/35803296/74338113-8bb10700-4ddc-11ea-8803-e7663591f93e.png)
preview:![image](https://user-images.githubusercontent.com/35803296/74338178-a6837b80-4ddc-11ea-9b32-ff93c602ec90.png)
发现preview 不会进行显示,能帮我看下吗。感谢!!