Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_forum
杨树明 5 years ago
commit 145e50c9a7

@ -6,6 +6,9 @@ export function isImageExtension(fileName) {
export function markdownToHTML(oldContent, selector) {
window.$('#md_div').html('')
// markdown to html
try {
var markdwonParser = window.editormd.markdownToHTML("md_div", {
markdown: oldContent,
emoji: true,
@ -15,6 +18,11 @@ export function markdownToHTML(oldContent, selector) {
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
} catch(e) {
console.error(e)
}
const content = window.$('#md_div').html()
if (selector) {
window.$(selector).html(content)

Loading…
Cancel
Save