     @stackEditor.on Events.InitializeRequested, @bound 'initializeStack'
 
 
-  openEditor: (templateId, reset = no) ->
+  openEditor: (templateId, options = {}, callback = kd.noop) ->
+
+    { reset = no } = options
 
     unless templateId
       do @openStackWizard
-      return
+      return callback { message: 'No template provided' }
 
     @fetchStackTemplate templateId, (err, template) =>
-      return showErrorNotification err  if err
+
+      if err
+        showErrorNotification err
+        return callback err
+
       @stackEditor.setTemplateData template, reset
+      callback null
 
     markAsLoaded templateId
 

kd = require 'kd'
AppController = require 'app/appcontroller'
showErrorNotification = require 'app/util/showErrorNotification'

Events = require './events'
StackEditor = require './views'
StackWizardModal = require './views/wizard/stackwizardmodal'

{ markAsLoaded, log } = require './helpers'

