Add markdown editor

pull/9/head
ruibaby 2019-03-27 19:51:45 +08:00
parent 013181e440
commit f1ea43a6bb
3 changed files with 858 additions and 912 deletions

1734
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,9 +17,11 @@
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0",
"mavon-editor": "^2.7.2",
"md5": "^2.2.1",
"moment": "^2.24.0",
"nprogress": "^0.2.0",
"opencollective": "^1.0.3",
"opencollective-postinstall": "^2.0.2",
"viser-vue": "^2.4.5",
"vue": "^2.6.10",
@ -28,15 +30,14 @@
"vue-ls": "^3.2.1",
"vue-router": "^3.0.2",
"vue-svg-component-runtime": "^1.0.1",
"vuex": "^3.1.0",
"opencollective": "^1.0.3"
"vuex": "^3.1.0"
},
"devDependencies": {
"@babel/polyfill": "^7.4.0",
"@vue/cli-plugin-babel": "^3.5.1",
"@vue/cli-plugin-eslint": "^3.5.1",
"@vue/cli-plugin-unit-jest": "^3.5.1",
"@vue/cli-service": "^3.5.1",
"@vue/cli-plugin-unit-jest": "^3.5.2",
"@vue/cli-service": "^3.5.2",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "^1.0.0-beta.20",
"babel-core": "7.0.0-bridge.0",

View File

@ -12,6 +12,10 @@
<div style="margin-bottom: 16px">
<a-input addonBefore="https://ryanc.cc/archives/" defaultValue="mysite" style="width: 360px" />
</div>
<div id="editor">
<mavon-editor v-model="value"/>
</div>
</a-col>
<a-col :xl="6" :lg="6" :md="6" :sm="24" :xs="24">
@ -22,8 +26,27 @@
</template>
<script>
export default {}
import { mavonEditor } from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
export default {
name: 'Editor',
components: {
mavonEditor
},
data() {
return {
value: 'Hello World'
}
}
}
</script>
<style scoped>
#editor {
margin: auto;
width: 100%;
}
.v-note-wrapper{
z-index: 1000;
}
</style>