Rovak/InlineAttachment

How to use with Backbone?

kramer65 opened this issue · 3 comments

I'm currently building my first website with Backbone and I would like to use InlineAttachement. I'm kinda lost in how I should use this though.

Does anybody have an example of how to use this in a Backbone view? All tips are welcome!

Hi Kramer65,

I have no experience with Backbone, but i think that this should be done in the render method of a Backbone.View.

(Example code taken from Backbone.js documentation)

var Bookmark = Backbone.View.extend({
  template: _.template(),
  render: function() {
    // init here
    this.$el.find('textarea').inlineattach({
        uploadUrl: 'upload.php'
    });
    return this;
  }
});

@kramer65 did the above suggestion solve the issue?

Excuse, yes it did! Thanks a million!