       @editor.getSession().setValue slide.get "html"
       # console.log "changed", JSON.stringify @model.attributes
 
-    if @model.get "id" 
+    if @model.get "id"
       @model.fetch
         success: =>
           @trigger 'init', @


  initEditor: (model) ->
    @editor = new Editor model: model
    
    @editor.bind "init", =>
      @preview.id = model.get "id"
      @preview.reload()
    
    model.bind "saved", =>
      @preview.id = model.get "id"
      @preview.reload()

    console.log "RELOADING PREVIEW", @id
    @iframe.attr "src", ""
    @iframe.attr "src", "/view/#{ @id }"
    utils.msg.info "Saved and reloading preview now"


class FLIPS.Workspace extends Backbone.Router
