Closed re1oaded closed 4 years ago
我也遇到相同的问题,请问你们解决了吗?
看如上源代码可以看到,当externalLink不为对象或者externalLink['markdown_css']不为函数时codeStyle
才起作用
因此可以修改 externalLink 里面的 markdown_css 配置
markdown_css: false,
看如上源代码可以看到,当externalLink不为对象或者externalLink['markdown_css']不为函数时
codeStyle
才起作用 因此可以修改 externalLink 里面的 markdown_css 配置markdown_css: false,
使用false就禁用了markdown_css样式,不行的
看如上源代码可以看到,当externalLink不为对象或者externalLink['markdown_css']不为函数时
codeStyle
才起作用 因此可以修改 externalLink 里面的 markdown_css 配置markdown_css: false,
使用false就禁用了markdown_css样式,不行的
那你试着把&&typeof ...
的删掉,再重新编译一下mavonEditor;或者可以另外加载markdown_css,我这边就是因为另一个插件引入了,所以没造成影响.
看如上源代码可以看到,当externalLink不为对象或者externalLink['markdown_css']不为函数时
codeStyle
才起作用 因此可以修改 externalLink 里面的 markdown_css 配置markdown_css: false,
使用false就禁用了markdown_css样式,不行的
那你试着把
&&typeof ...
的删掉,再重新编译一下mavonEditor;或者可以另外加载markdown_css,我这边就是因为另一个插件引入了,所以没造成影响.
准备这么干
看如上源代码可以看到,当externalLink不为对象或者externalLink['markdown_css']不为函数时
codeStyle
才起作用 因此可以修改 externalLink 里面的 markdown_css 配置markdown_css: false,
使用false就禁用了markdown_css样式,不行的
那你试着把
&&typeof ...
的删掉,再重新编译一下mavonEditor;或者可以另外加载markdown_css,我这边就是因为另一个插件引入了,所以没造成影响.准备这么干
怎么样?
在网站头部另外引入: link rel="stylesheet" href="https://cdn.bootcss.com/github-markdown-css/2.9.0/github-markdown.min.css"
把markdown_css:设置为false
externalLink:{ markdown_css: false, //false后 highlight 才生效,在head中引用 markdown_css hljs_js: function() { return 'https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js'; }, hljs_lang: function(lang) { return 'https://cdn.bootcss.com/highlight.js/9.12.0/languages/' + lang + '.min.js'; }, hljs_css: function(css) { return 'https://cdn.bootcss.com/highlight.js/9.12.0/styles/' + css + '.min.css'; }, katex_js: function() { return 'https://cdn.bootcss.com/KaTeX/0.8.3/katex.min.js'; }, katex_css: function() { return 'https://cdn.bootcss.com/KaTeX/0.8.3/katex.min.css'; } },
这两个文件加载不了,代码无法高亮,其余都能加载,包括
highlight.min.js