         editor.focus()
         previousNode = id
 
-  _depthWalkCallbackGenerator = (holder) ->
+  _depthWalkCallbackGenerator = (holder, nodeTitleCallback) ->
     depthWalkCallback = (depth) ->
       node = this
       if not node.getAttribute?

    holder = []
    holder.unshift top

    helper.depthFirstIterativePreorder body, _depthWalkCallbackGenerator(holder)

    $(selector).jstree(
      json_data:
        data: [top]
      ui: 
        select_limit: 1
      core:

      while depth < (holder.length - 1)
        holder.shift()
      title = node.getAttribute('data-xmlel') || ("[" + node.localName + "]")
      if nodeTitleCallback
        additional = nodeTitleCallback(node, title)
        if additional
          title = title + ": " + helper.escapeHtml(additional)
      holder[0]['children'] ||= []
      holder[0]['state'] ||= 'closed'
      holder[0]['children'].push
