build: release v1.4.4

This commit is contained in:
yanglbme 2020-11-23 23:28:28 +08:00
parent d95e098c22
commit ba577270f4
3 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,9 @@
{
"name": "vue-md",
"version": "1.4.3",
"version": "1.4.4",
"homepage": ".",
"description": "An open-source wechat markdown editor.",
"author": "yanglbme <contact@yanglibin.info>",
"author": "doocs",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",

View File

@ -57,6 +57,10 @@ export default {
text: "下载 Markdown 文档",
key: "download",
},
{
text: "格式化 Markdown 文档",
key: "formatMarkdown",
},
],
],
};

View File

@ -339,6 +339,12 @@ export default {
downloadEditorContent() {
downloadMD(this.editor.getValue(0));
},
//
formatContent() {
const doc = formatDoc(this.editor.getValue(0));
localStorage.setItem("__editor_content", doc);
this.editor.setValue(doc);
},
//
openMenu(e) {
const menuMinWidth = 105;
@ -366,6 +372,10 @@ export default {
break;
case "insertTable":
this.dialogFormVisible = true;
break;
case "formatMarkdown":
this.formatContent();
break;
default:
break;
}