mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
687 B
27 lines
687 B
8 years ago
|
'use strict'
|
||
8 years ago
|
|
||
8 years ago
|
import * as ace from 'brace'
|
||
|
import 'brace/theme/tomorrow_night'
|
||
|
import 'brace/mode/markdown'
|
||
8 years ago
|
import pageLoader from '../components/page-loader'
|
||
8 years ago
|
|
||
8 years ago
|
export default {
|
||
|
name: 'source-view',
|
||
|
data() {
|
||
|
return {}
|
||
|
},
|
||
|
mounted() {
|
||
|
let scEditor = ace.edit('source-display')
|
||
8 years ago
|
scEditor.setTheme('ace/theme/tomorrow_night')
|
||
|
scEditor.getSession().setMode('ace/mode/markdown')
|
||
|
scEditor.setOption('fontSize', '14px')
|
||
|
scEditor.setOption('hScrollBarAlwaysVisible', false)
|
||
|
scEditor.setOption('wrap', true)
|
||
|
scEditor.setReadOnly(true)
|
||
|
scEditor.renderer.updateFull()
|
||
8 years ago
|
scEditor.renderer.on('afterRender', () => {
|
||
|
pageLoader.complete()
|
||
|
})
|
||
8 years ago
|
}
|
||
8 years ago
|
}
|