|
|
|
@ -6,6 +6,9 @@ export function isImageExtension(fileName) {
|
|
|
|
|
export function markdownToHTML(oldContent, selector) {
|
|
|
|
|
window.$('#md_div').html('')
|
|
|
|
|
// markdown to html
|
|
|
|
|
if (selector && oldContent && oldContent.startsWith('<p>')) { // 普通html处理
|
|
|
|
|
window.$(selector).html(oldContent)
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
var markdwonParser = window.editormd.markdownToHTML("md_div", {
|
|
|
|
|
markdown: oldContent, // .replace(/▁/g,"▁▁▁"),
|
|
|
|
@ -26,6 +29,7 @@ export function markdownToHTML(oldContent, selector) {
|
|
|
|
|
window.$(selector).html(content)
|
|
|
|
|
}
|
|
|
|
|
return content
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function appendFileSizeToUploadFile(item) {
|
|
|
|
|