The 'this' object does not refer to the editor #72

Closed
davidshen84 opened this Issue Apr 13, 2012 · 1 comment

Projects

None yet

2 participants

@davidshen84
var ee = new EpicEditor($('#editor).get(0));
ee.on('save', function() {
  alert(type of this);
});

The this object referred to the HTML document that EE created in the IFrame. In this context, it should refer to the editor itself.

@OscarGodson
Owner

You are totally right. I fixed this in our 0.1.0 branch.

0.0.3: https://github.com/OscarGodson/EpicEditor/blob/master/epiceditor.js#L761
0.1.0: https://github.com/OscarGodson/EpicEditor/blob/0.1.0-build-refactor/src/editor.js#L930

Looks like you are doing some serious work on EE! Thats great. If so you should try checking out the 0.1.0-build-refactor branch and let me know if you need help with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment