测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
授权协议 | MIT |
发布日期最后发布日期 | 2016年9月 |
由524284tpf维护。
依赖项 | |
WordPress-iOS-Shared | >= 0 |
WordPressCom-Analytics-iOS | >= 0 |
NSObject-SafeExpectations | >= 0 |
WYPopoverController | >= 0 |
UIAlertView+Blocks | >= 0 |
WordPress-Editor-iOS-Extension是一款iOS端的富文本编辑器。
WordPress-Editor-iOS-Extension是从WordPress-Editor-iOS的扩展而来,它支持“从相册中选择”、“拍照”、“插入网络图片”三种方式。并允许用户定制编辑器的工具栏。
"WordPress-Editor-iOS-Extension" 从 "WordPress-Editor-iOS" 扩展而来,支持 "从相册中选择"、"拍照" 和 "插入网络图片" 三种方式。并允许用户自定义编辑器的工具栏。
要运行示例项目,请先克隆仓库,然后从示例目录运行pod install
。
WordPress-Editor-iOS-Extension可通过CocoaPods获取。要安装它,只需将以下行添加到Podfile即可
pod "WordPress-Editor-iOS-Extension"
1. 您可以设置工具栏的主体色(you can set itemTintColor)
self.itemTintColor = [UIColor redColor];
2. 您可以设置多语言(you can set language)
#import "WPEditorConfiguration.h"
WPEditorConfiguration *_WPEditorConfiguration = [WPEditorConfiguration sharedWPEditorConfiguration];
// kLMDefaultLanguage @"en-US"
// kLMChinese @"zh-Hans"
// kLMChineseTW @"zh-TW"
// kLMChineseHK @"zh-HK"
// kLMChineseT @"zh-Hant"
_WPEditorConfiguration.localizable = kLMChinese;
3. 您可以控制插入图片的几种方式(you can control ways of Insert images)
_WPEditorConfiguration.enableImageSelect = ZSSRichTextEditorImageSelectPhotoLibrary |ZSSRichTextEditorImageSelectTakePhoto|ZSSRichTextEditorImageSelectInsertNetwork;
4. 您可以得到第一张图片的URL,作为封面图(you can get URL of the first image as cover image)
NSString *cover_image_url = [self.editorView getCoverImage];
5. 您也可以得到所有图片的URL(You'll also be able to get URLs of all the images)
NSArray *allImage = [self.editorView getAllImage];
tianpengfei, [email protected]
WordPress-Editor-iOS-Extension遵循MIT授权协议。有关更多信息,请参阅LICENSE文件。