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.

25 lines
701 B

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