Allow file_id to be captured

This commit is contained in:
Maximilian Grundke
2018-08-14 21:36:24 +02:00
parent 369b0c8908
commit f73de94f4d

View File

@@ -158,7 +158,7 @@ configureEditors: function () {
category: 'editor_paste', category: 'editor_paste',
data: pasteObject.text, data: pasteObject.text,
exercise_id: $('#editor').data('exercise-id'), exercise_id: $('#editor').data('exercise-id'),
file_id: "1" file_id: $(this).data('file-id')
}); });
} }
}, },
@@ -248,8 +248,8 @@ configureEditors: function () {
*/ */
// editor itself // editor itself
editor.on("paste", this.handlePasteEvent.bind(this)); editor.on("paste", this.handlePasteEvent.bind(element));
editor.on("copy", this.handleCopyEvent.bind(this)); editor.on("copy", this.handleCopyEvent.bind(element));
// listener for autosave // listener for autosave
session.on("change", function (deltaObject) { session.on("change", function (deltaObject) {