Add vue-simplemde replace vue-markdown

pull/38/head
lin-xin 2017-02-18 11:57:14 +08:00
parent 512566e990
commit f96ba1afac
2 changed files with 17 additions and 23 deletions

View File

@ -13,9 +13,9 @@
"element-ui": "^1.1.6",
"vue": "^2.1.10",
"vue-datasource": "^1.0.4",
"vue-markdown": "^2.1.3",
"vue-quill-editor": "^1.1.1",
"vue-router": "^2.2.0"
"vue-router": "^2.2.0",
"vue-simplemde": "^0.3.2"
},
"devDependencies": {
"autoprefixer": "^6.7.2",

View File

@ -7,39 +7,33 @@
</el-breadcrumb>
</div>
<div class="plugins-tips">
vue-markdown一个基于vue.js的markdown语法解析插
访问地址<a href="https://github.com/miaolz123/vue-markdown" target="_blank">vue-markdown</a>
Vue-SimpleMDEVue.js的Markdown Editor组
访问地址<a href="https://github.com/F-loat/vue-simplemde" target="_blank">Vue-SimpleMDE</a>
</div>
<textarea class="markdown-left" v-model="content"></textarea>
<vue-markdown class="markdown-right" :source="content"></vue-markdown>
<markdown-editor v-model="content" :configs="configs" ref="markdownEditor"></markdown-editor>
</div>
</template>
<script>
import VueMarkdown from 'vue-markdown';
import { markdownEditor } from 'vue-simplemde';
export default {
data: function(){
return {
content:'# Hello BBK'
content:'',
configs: {
status: false,
initialValue: 'Hello BBK',
renderingConfig: {
codeSyntaxHighlighting: true,
highlightingTheme: 'atom-one-light'
}
}
}
},
components: {
VueMarkdown
markdownEditor
}
}
</script>
<style scoped>
.markdown-left,.markdown-right{
width:48%;
height: 700px;
float: left;
padding:10px;
box-sizing: border-box;
border: 1px solid #ddd;
overflow-y: scroll;
}
.markdown-right{
margin-left: 3%;
}
</style>
<style></style>