Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8961137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:49:03+00:00 2026-06-15T15:49:03+00:00

Does anyone ever faced the integration of Etch.js in a Backbone.Marionette.js application? I’m having

  • 0

Does anyone ever faced the integration of Etch.js in a Backbone.Marionette.js application?

I’m having issues binding the save event. This is the code for my Marionette view:

MyApp.module('Views', function(Views, App, Backbone, Marionette, $, _) {

    Views.DetailsView = Marionette.ItemView.extend({

        template: '#details',

        initialize: function(options) {
            _.bindAll(this.model, 'save'); // I think the problem is related to the binding
            this.model.bind('save', this.model.save);
        },

        events: {
            'mousedown .editable': 'editableClick'
        },

        editableClick: etch.editableInit
    });
});

and in my template I have something like the following:

<div id="detail-expanded">
     <p>Description: <span class="editable">{{ description }}</span></p>
</div>

The plugin is loaded correctly, if I click on the field I can see the Etch buttons bar, I can edit the content of the element made editable and if I click on the save button I’m actually able to trigger the model save() method.

The problem is that the model submitted is the original one, without the edits that I did to the field. I think it’s a binding problem, any ideas?

Thanks in advance, as always.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:49:04+00:00Added an answer on June 15, 2026 at 3:49 pm

    So, the problem here is not really related to marionette, it’s that etch doesn’t handle moving the data from the editable field to the model. I should be more explicit about that in the docs. What you want to do is create a save function on the view that does this for you like so:

    Views.DetailsView = Marionette.ItemView.extend({
    
        template: '#details',
    
        initialize: function(options) {
            _.bindAll(this, 'save');
            this.model.bind('save', this.save);
        },
    
        events: {
            'mousedown .editable': 'editableClick'
        },
    
        editableClick: etch.editableInit,
    
        save: function() {
          // populate model attrs from dom
          var title = this.$('.title').text();
          var body = this.$('.body').text();
    
    
          this.model.save({title: title, body: body});
        }
    });
    

    Sorry for the confusion. I can see how the docs are misleading in this regard.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone ever tested, or does anyone know, the performance differences of these two
Does anyone know if there will ever be a true 64-bit version of Cygwin?
Does anyone of you ever heard about a PHP open source solution that would
Does anyone ever use stopwatch benchmarking, or should a performance tool always be used?
Is this possible? Does anyone ever do this? I feel like I can lay
Does anyone ever have problem like this?? The Enter , Tab , and space
Has anyone ever seen this and does anyone know how to fix it ...
Does anyone ever see a lot of errors like this: Exception `Net::HTTPBadResponse' at /usr/lib/ruby/1.8/net/http.rb:2022
Does anyone of you has ever seen a real life occurence of the HTTP
Does anyone have a function that will iterate through ever masterpage/sub masterpage that a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.