javascript - Oninput event in ace.js -
javascript - Oninput event in ace.js -
i have few editors on 1 page. stored in array.
how determine editor come in text?
    for(var = 0; < types.length; i++) {         editors[types[i]].on('input', function() {             console.log( ? ); // how current editor?             //console.log(editors[types[i]]); // doesn't work         });     }       thanks in advance.
according examples here, can see ace's on functions have this variable references caller
for(var = 0; < types.length; i++) {     editors[types[i]].on('input', function() {         // eg:         console.log(this);     }); }           javascript ace-editor 
 
Comments
Post a Comment