|
|
@@ -8,37 +8,28 @@
|
|
|
</div>
|
|
|
<div class="container">
|
|
|
<div class="plugins-tips">
|
|
|
- Vue-SimpleMDE:Vue.js的Markdown Editor组件。
|
|
|
- 访问地址:<a href="https://github.com/F-loat/vue-simplemde" target="_blank">Vue-SimpleMDE</a>
|
|
|
- </div>
|
|
|
- <markdown-editor v-model="content" :configs="configs" ref="markdownEditor"></markdown-editor>
|
|
|
- <div class="plugins-tips">
|
|
|
- <p>既然用了markdown语法了,那么就有一个很实际的问题了。要怎么在前台展示数据呢?</p>
|
|
|
- <br>
|
|
|
- <p>这个时候就需要解析markdown语法了。可以使用 <a href="https://github.com/miaolz123/vue-markdown" target="_blank">vue-markdown</a>:一个基于vue.js的markdown语法解析插件。(这里不作展开,有需要自行了解)</p>
|
|
|
+ mavonEditor:基于Vue的markdown编辑器。
|
|
|
+ 访问地址:<a href="https://github.com/hinesboy/mavonEditor" target="_blank">mavonEditor</a>
|
|
|
</div>
|
|
|
+ <mavon-editor v-model="content" codeStyle="tomorrow-night-blue" style="min-height: 600px"/>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { markdownEditor } from 'vue-simplemde';
|
|
|
+ import { mavonEditor } from 'mavon-editor'
|
|
|
+ import 'mavon-editor/dist/css/index.css'
|
|
|
export default {
|
|
|
data: function(){
|
|
|
return {
|
|
|
content:'',
|
|
|
configs: {
|
|
|
- status: true,
|
|
|
- initialValue: 'Hello BBK',
|
|
|
- renderingConfig: {
|
|
|
- codeSyntaxHighlighting: true,
|
|
|
- highlightingTheme: 'atom-one-light'
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- markdownEditor
|
|
|
+ mavonEditor
|
|
|
}
|
|
|
}
|
|
|
</script>
|