hinesboy / mavonEditor

mavonEditor - A markdown editor based on Vue that supports a variety of personalized features
http://www.mavoneditor.com/
MIT License
6.45k stars 918 forks source link

markdown-it config 可不可以自定义啊? #619

Closed YuAoi closed 3 years ago

YuAoi commented 4 years ago

mixins 中 markdown-it 的 config 可以改成动态传进去的话,或者做成可以配置的,我想要把 typographer 改成 false 来使用。

var markdown_config = {
    html: true,        // Enable HTML tags in source
    xhtmlOut: true,        // Use '/' to close single tags (<br />).
    breaks: true,        // Convert '\n' in paragraphs into <br>
    langPrefix: 'lang-',  // CSS language prefix for fenced blocks. Can be
    linkify: false,        // 自动识别url
    typographer: false, // 这里想改成 false
    quotes: '“”‘’'
}
ygj6 commented 3 years ago

属性设置示例如下,更多获取Markdown-It示例方式可以参考markdown.md

<mavon-editor ref="md"></mavon-editor>
mounted (){
        let markdownIt = this.$ref.md.markdownIt;
        markdownIt.set({ typographer: false }); 
}
ygj6 commented 3 years ago

关闭issue,有问题可以重新打开