plugins/themeBuilder/client/themeBuilder.js
function initAceEditor(themeId, folderName, fileName, text, mode) {
        hideImageHolder();
        $("#" + editorId).show();
        var doc = new Document(text);
        var session = new EditSession(doc, "ace/mode/" + mode);
        session.setUndoManager(new UndoManager());
        editor.setSession(session);

        //bind change event for text changes in opened file and save them.
        doc.on('change', function (e) {
            // e.type, etc
            console.log(e);
            saveFileChanges(themeId, folderName, fileName, doc.getValue());
        });
    }
function initAceEditor(themeId, folderName, fileName, text, mode) {
        hideImageHolder();
        $("#" + editorId).show();
        var doc = new Document(text);
        var session = new EditSession(doc, "ace/mode/" + mode);
        session.setUndoManager(new UndoManager());
        editor.setSession(session);

        //bind change event for text changes in opened file and save them.
        doc.on('change', function (e) {
            // e.type, etc
            console.log(e);
            saveFileChanges(themeId, folderName, fileName, doc.getValue());
        });
    }
function initAceEditor ( themeId , folderName , fileName , text , mode ) { hideImageHolder ( ) ; $ ( "#" + editorId ) . show ( ) ; var doc = new Document ( text ) ; var session = new EditSession ( doc , "ace/mode/" + mode ) ; session . setUndoManager ( new UndoManager ( ) ) ; editor . setSession ( session ) ; //bind change event for text changes in opened file and save them. doc . on ( 'change' , function ( e ) { // e.type, etc console . log ( e ) ; saveFileChanges ( themeId , folderName , fileName , doc . getValue ( ) ) ; } ) ; }
Initialize editor for each file opened
@param {String} themeId
@param {String} folderName
@param {String} fileName
@param {String} text
@param {String} mode
Initialize editor for each file opened