diff --git a/apps/assets/coffee/MarkOn.coffee b/apps/assets/coffee/MarkOn.coffee index 57db38a..6aebd53 100644 --- a/apps/assets/coffee/MarkOn.coffee +++ b/apps/assets/coffee/MarkOn.coffee @@ -1,12 +1,12 @@ class MarkOn extends window.classes.BaseObject - constructor: (@id) -> + constructor: () -> super "MarkOn" init: () -> me = @ @ready() .then () -> - me.editor = new SimpleMDE { element: $(me.id)[0] } + me.editor = new SimpleMDE { element: $("#editor")[0] } .catch (m, s) -> console.error(m, s) diff --git a/apps/assets/scripts/main.js b/apps/assets/scripts/main.js index bc47c88..1ee5ffa 100644 --- a/apps/assets/scripts/main.js +++ b/apps/assets/scripts/main.js @@ -117,8 +117,7 @@ MarkOn = (function(superClass) { extend(MarkOn, superClass); - function MarkOn(id) { - this.id = id; + function MarkOn() { MarkOn.__super__.constructor.call(this, "MarkOn"); } @@ -127,7 +126,7 @@ me = this; return this.ready().then(function() { return me.editor = new SimpleMDE({ - element: $(me.id)[0] + element: $("#editor")[0] }); })["catch"](function(m, s) { return console.error(m, s);