This commit is contained in:
yqbk
2016-08-26 13:16:38 +02:00
parent 0b6dc5e409
commit e17782b18d
5 changed files with 23 additions and 87 deletions

View File

@@ -24,13 +24,16 @@ $(function() {
editor.setShowPrintMargin(false);
editor.setTheme(THEME);
//todo
// var textarea = $('textarea[name="2822862"]');
// alert($(element).data('file-id'));
// editor.getSession().setValue(textarea.val());
// editor.getSession().on('change', function(){
// textarea.val(editor.getSession().getValue());
// });
var textarea = $('textarea[id="exercise_files_attributes_'+index+'_content"]');
var content = textarea.val();
if (content != undefined)
{
editor.getSession().setValue(content);
editor.getSession().on('change', function(){
textarea.val(editor.getSession().getValue());
});
}
editor.commands.bindKey("ctrl+alt+0", null);
var session = editor.getSession();