mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
build: release v1.4.4
This commit is contained in:
parent
d95e098c22
commit
ba577270f4
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-md",
|
"name": "vue-md",
|
||||||
"version": "1.4.3",
|
"version": "1.4.4",
|
||||||
"homepage": ".",
|
"homepage": ".",
|
||||||
"description": "An open-source wechat markdown editor.",
|
"description": "An open-source wechat markdown editor.",
|
||||||
"author": "yanglbme <contact@yanglibin.info>",
|
"author": "doocs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
|
@ -57,6 +57,10 @@ export default {
|
|||||||
text: "下载 Markdown 文档",
|
text: "下载 Markdown 文档",
|
||||||
key: "download",
|
key: "download",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: "格式化 Markdown 文档",
|
||||||
|
key: "formatMarkdown",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
@ -339,6 +339,12 @@ export default {
|
|||||||
downloadEditorContent() {
|
downloadEditorContent() {
|
||||||
downloadMD(this.editor.getValue(0));
|
downloadMD(this.editor.getValue(0));
|
||||||
},
|
},
|
||||||
|
// 格式化文档
|
||||||
|
formatContent() {
|
||||||
|
const doc = formatDoc(this.editor.getValue(0));
|
||||||
|
localStorage.setItem("__editor_content", doc);
|
||||||
|
this.editor.setValue(doc);
|
||||||
|
},
|
||||||
// 右键菜单
|
// 右键菜单
|
||||||
openMenu(e) {
|
openMenu(e) {
|
||||||
const menuMinWidth = 105;
|
const menuMinWidth = 105;
|
||||||
@ -366,6 +372,10 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case "insertTable":
|
case "insertTable":
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
|
break;
|
||||||
|
case "formatMarkdown":
|
||||||
|
this.formatContent();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user