no message
Former-commit-id: 0a96bb54e9270e451e59b72e00e35053a7c0e152 Former-commit-id: c250ba90da6546626b9831847630aae786c88344 Former-commit-id: c1182b1bdc6ea9b3934275286a93e2760a643bfe
This commit is contained in:
45
src/components/core/SimpleMDE/index.vue
Normal file
45
src/components/core/SimpleMDE/index.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="markdown-editor">
|
||||
<textarea ref="mde"></textarea>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SimpleMDE from 'simplemde'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
mde: null
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.init()
|
||||
},
|
||||
destroyed () {
|
||||
this.mde = null
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.mde = new SimpleMDE({
|
||||
element: this.$refs.mde
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.markdown-editor {
|
||||
.markdown-body {
|
||||
padding: 0.5em;
|
||||
}
|
||||
}
|
||||
.markdown-editor {
|
||||
.editor-preview-active {
|
||||
display: block;
|
||||
}
|
||||
.editor-preview-active-side {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user