chore: some editor improvements

This commit is contained in:
Dominik Pschenitschni 2021-10-02 20:46:26 +02:00
parent 34d0f28678
commit 117980a8fc
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
3 changed files with 157 additions and 157 deletions

View file

@ -21,21 +21,15 @@ export default {
previewClass: String,
autoinit: {
type: Boolean,
default() {
return true
},
default: true,
},
highlight: {
type: Boolean,
default() {
return false
},
default: false,
},
sanitize: {
type: Boolean,
default() {
return false
},
default: false,
},
configs: {
type: Object,
@ -51,6 +45,7 @@ export default {
data() {
return {
isValueUpdateFromInner: false,
easymde: null,
}
},
mounted() {
@ -63,10 +58,10 @@ export default {
if (isFullScreen) editor.toggleFullScreen()
},
beforeUnmount() {
if (this.easyMDE) {
this.easyMDE.toTextArea()
this.easyMDE.cleanup()
this.easyMDE = null
if (this.easymde) {
this.easymde.toTextArea()
this.easymde.cleanup()
this.easymde = null
}
},
methods: {