         textView.title.text = title
         textView.title.closable = closable
 
-        doc = textView.editor
-        expose.doc = doc
-        docView = new DocView(doc)
-        spy.dv = spy.docView = docView
+        editor = textView.editor
+
+        editor.on 'changes', (cm, changes) =>
+            for change,i in changes
+                slog.editor 'change', i
+                slog.editor 'from:   ', change.from
+                slog.editor 'to:     ', change.to
+                slog.editor 'text:   ', change.text
+                slog.editor 'origin: ', change.origin
 
         return textView
 


        panel.insertRight(textView)
        panel.insertBottom(coffeeConsole, textView)
        panel.insertLeft(linkView.widget)

        # adjust panel sizes
        panel.layout._children[0].setSizes([4,6])

        spy.panel = panel

        spy.coffeeConsole = makeConsole()
        linkView = new LinkViewWidget()
        linkView.title.text = 'Link View'
        linkView.title.closable = true

        spy.textView = makeTextView()

        spy.cc = spy.coffeeConsole = coffeeConsole
        spy.tv = spy.textView = textView
        spy.lv = spy.linkView = linkView
