Work around messy architecture

This commit is contained in:
Maximilian Grundke
2018-08-14 21:48:16 +02:00
parent f73de94f4d
commit 16533e2d89

View File

@ -150,11 +150,11 @@ configureEditors: function () {
}, },
handlePasteEvent: function (pasteObject) { handlePasteEvent: function (pasteObject) {
var same = (this.lastCopyText === pasteObject.text); var same = (CodeOceanEditor.lastCopyText === pasteObject.text);
// if the text is not copied from within the editor (from any file), send an event to the backend // if the text is not copied from within the editor (from any file), send an event to the backend
if (!same) { if (!same) {
this.publishCodeOceanEvent({ CodeOceanEditor.publishCodeOceanEvent({
category: 'editor_paste', category: 'editor_paste',
data: pasteObject.text, data: pasteObject.text,
exercise_id: $('#editor').data('exercise-id'), exercise_id: $('#editor').data('exercise-id'),