 
 {IS_MOBILE} = require('./feature')
 
+syncstring = require('smc-util/syncstring')
+
 class AbstractSynchronizedDoc extends EventEmitter
     file_path: () =>
         if not @_file_path?

        if not @codemirror? or not @_fully_loaded
            cb() # nothing to do -- not initialized/loaded yet...
            return
        @_syncstring.set(@codemirror.getValue())
        async.series [@_syncstring.save, @_syncstring.save_to_disk], (err) =>
            @_update_unsaved_uncommitted_changes()
            if err

        @codemirror1 = @editor.codemirror1
        @element     = @editor.element

        # window.w = @
        # replace undo/redo by sync-aware versions
        for cm in [@codemirror, @codemirror1]
            cm.undo = @undo
