 {me} = require 'lib/auth'
 filters = require 'lib/image_filter'
 Range = ace.require('ace/range').Range
+UndoManager = ace.require('ace/undomanager').UndoManager
 Problem = require './Problem'
 SpellDebugView = require './SpellDebugView'
 SpellToolbarView = require './SpellToolbarView'


  fillACE: ->
    @ace.setValue @spell.source
    @ace.clearSelection()

  addZatannaSnippets: (e) ->

    @loaded = false
    @previousSource = @ace.getValue()
    @ace.setValue('')
    @aceSession.setUndoManager(new UndoManager())
    fireURL = 'https://codecombat.firebaseio.com/' + @spell.pathComponents.join('/')
    @fireRef = new Firebase fireURL
    firepadOptions = userId: me.id
