forked from zhaoxuhui1122/vue-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhaoxh
committed
Oct 28, 2019
1 parent
952d702
commit b8b636f
Showing
32 changed files
with
1,981 additions
and
1,770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
src/markdown/font/*.js | ||
src/doc.js | ||
src/markdown/js/hljs.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"rules": {}, | ||
"env": { | ||
"es6": true, | ||
"browser": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:vue/essential" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"plugins": [ | ||
"vue" | ||
] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,101 @@ | ||
<template> | ||
<div id="app"> | ||
<div class="container"> | ||
<h1>vue-markdown编辑器组件</h1> | ||
<a target="_blank" href="https://github.com/zhaoxuhui1122/vue-markdown">使用文档</a> | ||
<div class="content"> | ||
<mark-down @on-paste-image="handlePasteImage" @on-save="save" :theme="theme" :initialValue="initialValue" :markedOptions="{baseUrl:'http://smalleyes.oss-cn-shanghai.aliyuncs.com/'}"></mark-down> | ||
</div> | ||
<div id="app"> | ||
<div class="container"> | ||
<h1>vue-markdown编辑器组件</h1> | ||
<a target="_blank" href="https://github.com/zhaoxuhui1122/vue-markdown">使用文档</a> | ||
<div class="content"> | ||
<mark-down | ||
@on-paste-image="handlePasteImage" | ||
@on-save="save" | ||
:theme="theme" | ||
v-model="value" | ||
@on-theme-change="onThemeChange" | ||
:markedOptions="{baseUrl:'http://smalleyes.oss-cn-shanghai.aliyuncs.com/'}"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import MarkDown from './markdown/index' // 开发文件 | ||
// import MarkDown from "../build"; // 引入打包好的文件 | ||
// import MarkDown from 'vue-meditor'; | ||
import MarkDown from './markdown/index' // 开发文件 | ||
// import MarkDown from "../build"; // 引入打包好的文件 | ||
// import MarkDown from 'vue-meditor'; | ||
import doc from './doc'; | ||
export default { | ||
name: "app", | ||
components: { | ||
MarkDown | ||
}, | ||
data() { | ||
return { | ||
initialValue: "", | ||
theme: 'OneDark' | ||
}; | ||
}, | ||
methods: { | ||
save(res) { | ||
console.log(res); | ||
}, | ||
handlePasteImage(res) { | ||
console.log(res); | ||
} | ||
}, | ||
mounted() { | ||
setTimeout(() => { | ||
this.initialValue = doc; | ||
}, 1000); | ||
import doc from './doc'; | ||
} | ||
}; | ||
export default { | ||
name: "app", | ||
components: { | ||
MarkDown | ||
}, | ||
data() { | ||
return { | ||
value: "", | ||
theme: 'OneDark' | ||
}; | ||
}, | ||
methods: { | ||
save(res) { | ||
console.log(res); | ||
}, | ||
handlePasteImage(res) { | ||
console.log(res); | ||
}, | ||
onThemeChange(theme) { | ||
console.log(theme) | ||
} | ||
}, | ||
mounted() { | ||
setTimeout(() => { | ||
this.value = doc; | ||
}, 1000); | ||
}, | ||
watch: { | ||
value() { | ||
console.log(this.value) | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped lang="less"> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
.container { | ||
width: 1200px; | ||
margin: 0 auto; | ||
.container { | ||
width: 80vw; | ||
margin: 0 auto; | ||
h1 { | ||
font-size: 26px; | ||
font-weight: 400; | ||
margin: 12px 0; | ||
} | ||
h1 { | ||
font-size: 26px; | ||
font-weight: 400; | ||
margin: 12px 0; | ||
} | ||
a { | ||
display: inline-block; | ||
background-color: #f8f8f9; | ||
border-radius: 4px; | ||
padding: 8px 16px; | ||
border: 1px solid #edeff0; | ||
border-radius: 4px; | ||
margin-bottom: 20px; | ||
text-decoration: none; | ||
color: #2d8cf0; | ||
} | ||
a { | ||
display: inline-block; | ||
background-color: #f8f8f9; | ||
border-radius: 4px; | ||
padding: 8px 16px; | ||
border: 1px solid #edeff0; | ||
border-radius: 4px; | ||
margin-bottom: 20px; | ||
text-decoration: none; | ||
color: #2d8cf0; | ||
} | ||
ul { | ||
list-style: none; | ||
} | ||
ul { | ||
list-style: none; | ||
} | ||
.content { | ||
border: 1px solid #ccc; | ||
.content { | ||
/*border: 1px solid #ccc;*/ | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.