code: function(el) {
      var path = [];
      var current = el;
  
      while(current) {
  
        // if available extract a path fragment
        if (current.getAttribute) {
          // Stop when we find an element which has been made read-only
          if (current.getAttribute("contenteditable") === "false") {
            return null;
          }
  
          // if there is a path attibute we collect it
          var p = current.getAttribute("data-path");
          if (p) path.unshift(p);
        }
  
        // node-views
        if ($(current).is(".content-node")) {
          var id = current.getAttribute("id");
          if (!id) {
            throw new Error("Every element with class 'content-node' must have an 'id' attribute.");
          }
          path.unshift(id);
  
          // STOP here
          return path;
        }
  
        current = current.parentElement;
      }
  
      return null;
    }
docs: Private helpers ---------------