美文网首页
iOS富文本HTML编辑器

iOS富文本HTML编辑器

作者: 短腿的大shu | 来源:发表于2018-01-10 11:21 被阅读172次

采用UIWebView加载本地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

相关文章

网友评论

      本文标题:iOS富文本HTML编辑器

      本文链接:https://www.haomeiwen.com/subject/hdvojxtx.html