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
735 B

  1. 'use strict'
  2. /* global siteRoot */
  3. export default {
  4. name: 'source-view',
  5. data() {
  6. return {}
  7. },
  8. mounted() {
  9. let self = this
  10. FuseBox.import(siteRoot + '/js/ace/ace.js', (ace) => {
  11. let scEditor = ace.edit('source-display')
  12. scEditor.setTheme('ace/theme/dawn')
  13. scEditor.getSession().setMode('ace/mode/markdown')
  14. scEditor.setOption('fontSize', '14px')
  15. scEditor.setOption('hScrollBarAlwaysVisible', false)
  16. scEditor.setOption('wrap', true)
  17. scEditor.setOption('showPrintMargin', false)
  18. scEditor.setReadOnly(true)
  19. scEditor.renderer.updateFull()
  20. scEditor.renderer.on('afterRender', () => {
  21. self.$store.dispatch('pageLoader/complete')
  22. })
  23. })
  24. }
  25. }