mirror of
https://github.com/doocs/md.git
synced 2024-11-24 11:00:33 +08:00
build: release v1.4.4
This commit is contained in:
parent
d95e098c22
commit
ba577270f4
@ -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",
|
||||
|
@ -57,6 +57,10 @@ export default {
|
||||
text: "下载 Markdown 文档",
|
||||
key: "download",
|
||||
},
|
||||
{
|
||||
text: "格式化 Markdown 文档",
|
||||
key: "formatMarkdown",
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user