 
   stopEdit: ->
     @editing = false
-    @editorElement.parentNode.removeChild(@editorElement)
+    console.log(@editorElement)
+    @editorElement?.parentNode?.removeChild(@editorElement)
     @textEditorSubscriptions?.dispose()
     @textEditorSubscriptions = null
     @focus()

  createTextEditor: ->
    @editor ?= atom.workspace.buildTextEditor({mini: true})
    @editorElement ?= atom.views.getView(@editor)
    @appendChild(@editorElement)

  subscribeToCellTextEditor: (editor) ->

  startCellEdit: (initialData) ->
    return if @readOnly

    @createTextEditor()

    @subscribeToCellTextEditor(@editor)

