# 回调列表

# 文字文档基础回调

/// 文字文档基础回调
@protocol IFLYDocsEditorViewDelegate <NSObject>

/// 文字文档加载回调
- (void)onDocsEditorLoad;

@end

# 文字文档Format模块回调

/// 文字文档Format模块回调
@protocol IFLYDocsFormatDelegate <NSObject>

/// 当前光标位置样式变更回调
/// @param format 样式信息
- (void)onFormatChange:(IFLYDocsFormat *)format;

@end

# 文字文档协作模块代理方法总览

/// 协作模块代理方法
@protocol IFLYDocsCollaborationDelegate <NSObject>

@optional
/// 协作连接建立成功回调
- (void)docsOnCollaborationConnectSuccess;

/// 协作连接建立失败回调
///
/// 此回调会在自动重连过程中反复被调用
- (void)docsOnCollaborationConnectFail:(NSDictionary *)errorInfo;

/// 用户令牌过期或者无效回调
- (void)docsOnAccessTokenInvalid;

/// 内容变更缓存
/// @param cache 快照以及正在上传和上传中的ops
- (void)docsCache:(NSDictionary *)cache;


/// 当前文件不存在 - 已经被删除
- (void)docsOnFileNotExist;


/// 当前文件内容异常
- (void)docsOnContentError:(NSDictionary *)errorInfo;


/// 当前协作编辑的用户集合
/// @param userList 具体内容
- (void)docsUserEditingList:(NSArray *)userList;


/// 当前协作权限变更
- (void)docsOnPermissionChange:(NSDictionary *)permissionInfo;


@end

# 当前文件不存在

# 功能概述

文件被删除等情况下的回调。

# 接口声明

/// 当前文件不存在 - 已经被删除
- (void)docsOnFileNotExist;

# 参数说明

无。

# 返回值说明

无。

# 回调时机

当前协作的文件被删除时。

# 回调示例

- (void)docsOnFileNotExist
{
    // 提示用户
    [SVProgressHUD showErrorWithStatus:@"文档已删除"];

    // 去除聚焦
    self.docEditorView.action.focus = NO;

    // 退出界面
    [self.navigationController popToRootViewControllerAnimated:YES];
}

# 注意事项

主动删除端也会收到此回调,处理时需要注意界面是否异常。