       @treeIDPrefix = 'tmp_tree_'
       @ignoreNavigation = false
       @jsTree = $(@treeSelector)
+
       @jsTree.jstree @_jstreeOptions()
       if makeNodeTitle?
         @makeNodeTitle = makeNodeTitle
       @previousNode = null
       @elementHandler = new ElementHandler(@editor)
 
-    _jstreeOptions: (jsonData) ->
+    _jstreeOptions: (jsonData, initiallyOpen) ->
+      if not initiallyOpen?
+        initiallyOpen = []
       if not jsonData?
         jsonData =
           data:

      body = @editor.dom.getRoot()
      treeInstance = @jsTree.jstree('get_instance')

      top = {
        data: 'Document',
        state: 'open',


      helper.depthFirstIterativePreorder body, @depthWalkCallback

      # jstree removes all .jstree-related hooks when destroying
      @jsTree.jstree(@_jstreeOptions([top['children']], openNodes))
        .on('select_node.jstree', @selectNodeCallback)
        .on('click.jstree', 'li.jstree-leaf > ins', (event) ->
            $(event.currentTarget).siblings('a').click()
