     textState.localUpdate(delta)
     jetClient.checkRunwayReady()
   )
+
+  window.docText = ->
+    _($('iframe').contents().find('body').find('.line'))
+      .map( (line) -> 
+        $(line).text()
+      )
+      .join(' ')
+      .replace(/\s+/g,' ')
 )
+


  textState.applyDeltaToText = (delta, authorId) ->   # Hacky overwrite
    editor.applyDelta(delta)
  textState.applyDeltaToCursors = ->
  Stypi.Presence = {
    setUsers: ->

  window.toolbar = toolbar = new Tandem.Toolbar(editor)
  
  toolbar.on 'update', (attributes) ->
    $.post('/ios-message/format-change', {json: JSON.stringify(attributes)})


  editor.getText = -> ""
