hjg
2024-07-09 30304784e82d4bba24121328da8eb8490aec4f4f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require.config({
    baseUrl: '../assets/js',
    
    waitSeconds: 600,
    
    shim: {
        'bootstrap': {
            deps: ['jquery']
        },
        'ace': {
            deps: ['jquery', 'bootstrap']
        },
        'ace-elements': {
            deps: ['ace']
        }
    }
});
require(['jquery', 'bootstrap', 'ace', 'ace-extra', 'ace-elements'], function($) {
    //try, to hide possible errors in case ace.demo is not available
    try {
        ace.demo.init(true);//true means the call is not from inside a jQuery document ready event
    } catch(e) {}
    
    /**
    //you can restore state of elements now (ace-extra.js is loaded)
    $('.ace-save-state').each(function() {
        ace.settings.loadState(this);
    });
    
    //or as soon as you render an element such as sidebar, etc ...
      ace.settings.loadState('sidebar');
    */
});