# SDK常量说明

# 参数类

/// 用于激活协作模块的参数
@interface IFLYDocsCollaborationConfig : NSObject

/// 用户令牌
///
/// 在线编辑必须传递
@property (nonatomic, readwrite, copy)NSString *accessToken;

/// 文档唯一标识
///
/// 在线编辑必须传递
@property (nonatomic, readwrite, copy)NSString *fid;

/// 协作服务连接的URL
///
/// 在线编辑必须传递
@property (nonatomic, readwrite, copy)NSString *wsUrl;

/// 用户协作会话ID
///
/// 可以不传递
@property (nonatomic, readwrite, copy)NSString *sid;

/// 本地内容快照
///
/// 用于离线加载以及预加载
@property (nonatomic, readwrite, copy)NSString *snapshot;

/// 本地内容版本
///
/// 用于同步数据
@property (nonatomic, readwrite, copy)NSString *version;

/// 正在上传的数据
///
/// 用于同步数据
@property (nonatomic, readwrite, copy)NSString *inflightOp;

/// 待上传的数据
///
/// 用于同步数据
@property (nonatomic, readwrite, copy)NSString *pendingOps;

/// 是否开启本地存储
@property (nonatomic, readwrite, assign)BOOL      isLocalDoc;


@end

# 枚举

///段落对齐样式枚举
typedef NS_ENUM(NSUInteger, EditorAlignStyle) {
    EditorAlignLeft,      //左对齐
    EditorAlignCenter,    //居中
    EditorAlignRight,     //右对齐
    EditorAlignJustify    //两端对齐
};
///颜色样式枚举
typedef NS_ENUM(NSUInteger, EditorColorStyle) {
    EditorColorNone,
    EditorColorStandardGrey,     //#0d0d0d
    EditorColorStandardGrey8,    //#353535
    EditorColorStandardGrey7,    //#545454
    EditorColorStandardGrey6,    //#9e9e9e
    EditorColorStandardGrey5,    //#cccccc
    EditorColorStandardGrey4,    //#e6e6e6
    EditorColorStandardGrey3,    //#f7f7f7
    EditorColorWhite,            //#ffffff
    EditorColorStandardRed,      //#fd4c51
    EditorColorStandardRed4,     //#fe9d9f
    EditorColorStandardOrange,   //#ff9500
    EditorColorStandardOrange4,  //#fec673
    EditorColorStandardYellow,   //#ffd500
    EditorColorStandardYellow4,  //#ffe873
    EditorColorStandardGreen,    //#52c41c
    EditorColorStandardGreen4,   //#9ae277
    EditorColorLakeBlue,         //#1990ff
    EditorColorLakeBlue4,        //#81c1ff
    EditorColorStandardCyan,     //#0e65ff
    EditorColorStandardCyan4,    //#7aa9ff
    EditorColorStandardPurple,   //#966fe7
    EditorColorStandardPurple4,  //#c4aef3
    EditorColorRoseRed,          //#f050aa
    EditorColorRoseRed4          //#f89dd0
};
///上下标样式枚举
typedef NS_ENUM(NSUInteger, EditorScriptStyle) {
    EditorScriptStyleNone,  //取消
    EditorScriptStyleSup,   //上标
    EditorScriptStyleSub    //下标
};
///标题样式枚举
typedef NS_ENUM(NSUInteger, EditorHeaderStyle) {
    EditorHeaderStyleNone,  //正文样式
    EditorHeaderStyle1,     //标题一样式
    EditorHeaderStyle2,     //标题二样式
    EditorHeaderStyle3,     //标题三样式
    EditorHeaderStyle4,      //标题四样式
    EditorHeaderStyle5,     //标题五样式
    EditorHeaderStyle6      //标题六样式
};
///字号样式枚举
typedef NS_ENUM(NSUInteger, EditorFontSize) {
    EditorFontSize9,     //字号9样式
    EditorFontSize11,    //字号11样式
    EditorFontSize12,    //字号12样式
    EditorFontSize14,    //字号14样式
    EditorFontSize16,    //字号16样式
    EditorFontSize18,    //字号18样式
    EditorFontSize22     //字号22样式
};
///行间距
typedef NS_ENUM(NSUInteger, EditorLineHeight) {
    EditorLineHeightNone,
    EditorLineHeight1,     //1倍行间距
    EditorLineHeight1P5,   //1.5倍行间距
    EditorLineHeight1P7,   //1.7倍行间距
    EditorLineHeight2,     //2倍行间距
    EditorLineHeight2P5,   //2.5倍行间距
    EditorLineHeight3,     //3倍行间距
};
///列表样式枚举
typedef NS_ENUM(NSUInteger, EditorListStyle) {
    EditorListStyleNone,     //取消列表样式
    EditorListStyleOrdered,  //有序列表
    EditorListStyleBullet    //无序列表
};
///缩进参数枚举
typedef NS_ENUM(NSUInteger, EditorIndentStyle) {
      EditorIndentStyleNone,   //取消缩进
      EditorIndentStyleAdd,    //增加缩进
      EditorIndentStyleMinus   //减小缩进
};
///待办事项枚举
typedef NS_ENUM(NSUInteger, EditorToDoListStyle) {
      EditorToDoListStyleNone,        //无待办事项样式
      EditorToDoListStyleChecked,     //待办事项选中
      EditorToDoListStyleUnchecked    //待办事项未选中
};

# 结构体

///选区结构体
typedef struct _EditorRange {
    NSUInteger index;   //索引
    NSUInteger length;  //长度
} EditorRange;

# 错误码

待补充