Commit feed55f1 authored by NGPixel's avatar NGPixel

Fix for code editor modelist

parent fe0c4ce0
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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)
})
}
......
......@@ -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'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment