code: function () {
        var scrollTop = content.scrollTop;
        var diff = (finalScrollTop - scrollTop);
        if (Math.abs(diff) > 3) {
          content.scrollTop += diff / 3;
          editor.animateCallback = callback;
          editor.animateTimeout = setTimeout(animate, 50);
        }
        else {
          // finished
          if (callback) {
            callback(true);
          }
          content.scrollTop = finalScrollTop;
          delete editor.animateTimeout;
          delete editor.animateCallback;
        }
      }
docs: animate towards the new scroll position