2017-06-29 20:46:08 +00:00
|
|
|
<template>
|
|
|
|
<form id="editor">
|
2017-07-01 07:36:28 +00:00
|
|
|
<h2 v-if="req.data.editor.type == 'complete'">Metadata</h2>
|
2017-06-30 17:03:08 +00:00
|
|
|
|
2017-07-01 07:36:28 +00:00
|
|
|
<h2 v-if="req.data.editor.type == 'complete'">Body</h2>
|
|
|
|
|
|
|
|
<div v-if="req.data.editor.type !== 'frontmatter-only'" class="content">
|
|
|
|
<div id="ace"></div>
|
|
|
|
<textarea id="source" name="content">{{ req.data.content }}</textarea>
|
|
|
|
</div>
|
2017-06-29 20:46:08 +00:00
|
|
|
</form>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2017-07-01 07:36:28 +00:00
|
|
|
import { mapState } from 'vuex'
|
|
|
|
|
2017-06-29 20:46:08 +00:00
|
|
|
export default {
|
|
|
|
name: 'editor',
|
2017-07-01 07:36:28 +00:00
|
|
|
computed: mapState(['req']),
|
2017-06-29 20:46:08 +00:00
|
|
|
data: function () {
|
2017-07-01 07:36:28 +00:00
|
|
|
return {
|
|
|
|
codemirror: null,
|
|
|
|
simplemde: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted: function () {
|
|
|
|
|
2017-06-29 20:46:08 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|