 
   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.info "Saved and reloading preview now"


class FLIPS.Workspace extends Backbone.Router

      @editor.getSession().setValue slide.get "html"
      # console.log "changed", JSON.stringify @model.attributes

    if @model.get "id"
      @model.fetch
        success: =>
          @trigger 'init', @
