|
|
@ -265,7 +265,7 @@ export default {
|
|
|
|
cursorPos: { ch: 0, line: 1 },
|
|
|
|
cursorPos: { ch: 0, line: 1 },
|
|
|
|
previewShown: true,
|
|
|
|
previewShown: true,
|
|
|
|
previewHTML: '',
|
|
|
|
previewHTML: '',
|
|
|
|
helpShown: true
|
|
|
|
helpShown: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
@ -332,7 +332,7 @@ export default {
|
|
|
|
this.previewHTML = md.render(newContent)
|
|
|
|
this.previewHTML = md.render(newContent)
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
Prism.highlightAllUnder(this.$refs.editorPreview)
|
|
|
|
Prism.highlightAllUnder(this.$refs.editorPreview)
|
|
|
|
Array.from(this.$refs.editorPreview.querySelectorAll('pre.line-numbers')).map(pre => pre.classList.add('prismjs'))
|
|
|
|
Array.from(this.$refs.editorPreview.querySelectorAll('pre.line-numbers')).forEach(pre => pre.classList.add('prismjs'))
|
|
|
|
this.scrollSync(this.cm)
|
|
|
|
this.scrollSync(this.cm)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}, 500),
|
|
|
|
}, 500),
|
|
|
|