Browse Source

Fix for code editor modelist

pull/73/head
NGPixel 7 years ago
parent
commit
feed55f1d1
3 changed files with 235 additions and 10 deletions
  1. 238
      assets/js/bundle.min.js
  2. 5
      client/js/components/editor-codeblock.js
  3. 2
      fuse.js

238
assets/js/bundle.min.js
File diff suppressed because it is too large
View File

5
client/js/components/editor-codeblock.js

@ -6,6 +6,7 @@ import _ from 'lodash'
import * as ace from 'brace'
import 'brace/theme/tomorrow_night'
import 'brace/mode/markdown'
import 'brace-ext-modelist'
let codeEditor = null
@ -31,7 +32,7 @@ let loadAceMode = (m) => {
// Vue Code Block instance
module.exports = (mde, mdeModalOpenState) => {
let modelist = {} // ace.require('ace/ext/modelist')
let modelist = ace.acequire('ace/ext/modelist')
let vueCodeBlock = new Vue({
el: '#modal-editor-codeblock',
data: {
@ -42,7 +43,7 @@ module.exports = (mde, mdeModalOpenState) => {
watch: {
modeSelected: (val, oldVal) => {
loadAceMode(val).done(() => {
ace.require('ace/mode/' + val)
ace.acequire('ace/mode/' + val)
codeEditor.getSession().setMode('ace/mode/' + val)
})
}

2
fuse.js

@ -30,7 +30,7 @@ const args = require('yargs')
// Define aliases
const ALIASES = {
'ace': 'ace-builds/src-min-noconflict/ace.js',
'brace-ext-modelist': 'brace/ext/modelist.js',
'simplemde': 'simplemde/dist/simplemde.min.js',
'socket.io-client': 'socket.io-client/dist/socket.io.min.js',
'vue': 'vue/dist/vue.js'

Loading…
Cancel
Save