/ERichTextEditor

使用UIWebView实现富文本形式的图文混编。可进行常规设置,如:字体大小、颜色、样式等。

Primary LanguageObjective-CApache License 2.0Apache-2.0

导语

本方案参考 ZSSRichTextEditor,使用UIWebView实现富文本形式的图文混编。笔者对部分常用设置进行封装,如:设置字体大小、颜色、样式等。

效果图.png

介绍

资源文件 说明
ZSSRichTextEditor.js 文本及图片的设置
editor.html 模板
封装文件 说明
ERichTextEditorView 对JS方法进行封装
ContentEditFooterView 底部视图
ERichTextToolBar 常规设置视图

字体的常规设置:

- (void)setBold;
- (void)setItalic;
- (void)setUnorderedList;
- (void)setOrderedList;
- (void)setBlockquote;
- (void)setStrikethrough;
- (void)setSelectedColor:(NSString *)hexColor;
- (void)heading1;
- (void)heading2;
- (void)heading3;
- (void)heading4;
- (void)undo;

结尾

若大家有其他需求可以在ERichTextEditorView基础上进行拓展添加,欢迎star~