tweak
This commit is contained in:
parent
ead385ee50
commit
011dec91f7
|
@ -12,7 +12,7 @@ import Editor from 'tui-editor'
|
|||
import defaultOptions from './defaultOptions'
|
||||
|
||||
export default {
|
||||
name: 'SimplemdeMd',
|
||||
name: 'MarddownEditor',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
|
@ -46,6 +46,11 @@ export default {
|
|||
default: 'en_US' // https://github.com/nhnent/tui.editor/tree/master/src/js/langs
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editor: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
editorOptions() {
|
||||
const options = Object.assign({}, defaultOptions, this.options)
|
||||
|
@ -64,6 +69,12 @@ export default {
|
|||
language(val) {
|
||||
this.destroyEditor()
|
||||
this.initEditor()
|
||||
},
|
||||
height(newValue) {
|
||||
this.editor.height(newValue)
|
||||
},
|
||||
mode(newValue) {
|
||||
this.editor.changeMode(newValue)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<div class="editor-container">
|
||||
<el-tag class="tag-title">I18n:</el-tag>
|
||||
<el-alert title="You can change admin global language to see the effect" type="success"/>
|
||||
<el-alert :closable="false" title="You can change the language of the admin system to see the effect" type="success"/>
|
||||
<markdown-editor v-model="content" :language="language" height="300px"/>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue