采用WKWebView加载本地JS/CSS的实现方式下载地址
- 常用函数
- (NSString *)titleText;
- (void)setupTitle:(NSString *)title;
//撤销
- (void)undo;
- (void)redo;
//加粗
- (void)bold;
//下划线
- (void)underline;
//斜体
- (void)italic;
//左对齐
- (void)justifyLeft;
//插入图片
- (void)inserImage:(UIImage *)image alt:(NSString *)alt;
.....
三、上传图片
实现思路:图片上传七牛服务器举例
WGEditor-mobile/design_up.png at master · study123456/WGEditor-mobile · GitHub
//开始插入图片
- (void)inserImage:(NSData *)imageData key:(NSString *)key;
//图片上传中
- (void)inserImageKey:(NSString *)imageKey progress:(CGFloat)progress;
//图片上传成功
- (void)inserSuccessImageKey:(NSString *)imageKey imgUrl:(NSString *)imgUrl;
//删除图片
- (void)deleteImageKey:(NSString *)key;
// 上传失败
- (void)uploadErrorKey:(NSString *)key;
实现效果
WGEditor-mobile/uploadImage.gif at master · study123456/WGEditor-mobile · GitHub