Latest 0.1.5
Homepage https://github.com/pzhtpf/WordPress-Editor-iOS-Extension
License MIT
Platforms ios 8.0, requires ARC
Dependencies WordPress-iOS-Shared, WordPressCom-Analytics-iOS, NSObject-SafeExpectations, WYPopoverController, UIAlertView+Blocks
Authors

CI Status
Version
License
Platform

WordPress-Editor-iOS-Extension 是一款iOS端的富文本编辑器。

WordPress-Editor-iOS-Extension 是从 WordPress-Editor-iOS 的扩展,他支持“从相册中选择”,“拍照”,“插入网络图片”三种方式。并允许用户可以定制编辑器的工具栏。

The expansion of "WordPress-Editor-iOS-Extension" from "WordPress-Editor-iOS", his support "photo library" and "take photo", "insert network picture" three ways. And can allow users to customize the editor toolbar.

这里写图片描述

这里写图片描述

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

WordPress-Editor-iOS-Extension is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "WordPress-Editor-iOS-Extension"

Usage

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 pictures)

   _WPEditorConfiguration.enableImageSelect =   ZSSRichTextEditorImageSelectPhotoLibrary |ZSSRichTextEditorImageSelectTakePhoto|ZSSRichTextEditorImageSelectInsertNetwork;

4, 你可以得到第一张图片的URL,作为封面图(you can get url of first image, as cover image)

  NSString *cover_image_url = [self.editorView getCoverImage];

5, 你也可以得到所有图片的URL(You’ll also be able to get URL of all the image)

  NSArray *allImage = [self.editorView getAllImage];

Author

tianpengfei, [email protected]

License

WordPress-Editor-iOS-Extension is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "WordPress-Editor-iOS-Extension",
    "version": "0.1.5",
    "summary": "Reusable component rich text editor for WordPress.com in an iOS application.",
    "description": "Reusable component rich text editor for WordPress.com in an iOS application.And can allow users to customize the editor toolbar.",
    "homepage": "https://github.com/pzhtpf/WordPress-Editor-iOS-Extension",
    "license": "MIT",
    "authors": {
        "tianpengfei": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pzhtpf/WordPress-Editor-iOS-Extension.git",
        "tag": "0.1.5"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "WordPress-Editor-iOS-Extension/Classes/**/*",
    "resources": [
        "WordPress-Editor-iOS-Extension/Assets/*.png",
        "WordPress-Editor-iOS-Extension/Assets/*.html",
        "WordPress-Editor-iOS-Extension/Assets/*.js",
        "WordPress-Editor-iOS-Extension/Assets/*.svg",
        "WordPress-Editor-iOS-Extension/Assets/*.css",
        "WordPress-Editor-iOS-Extension/Assets/*.storyboard",
        "WordPress-Editor-iOS-Extension/Assets/*.xib"
    ],
    "prefix_header_file": "WordPress-Editor-iOS-Extension/Classes/WordPress-Editor-iOS-Extension.pch",
    "resource_bundles": {
        "WordPress-Editor-iOS-Extension": [
            "WordPress-Editor-iOS-Extension/Assets/*.png"
        ]
    },
    "dependencies": {
        "WordPress-iOS-Shared": [],
        "WordPressCom-Analytics-iOS": [],
        "NSObject-SafeExpectations": [],
        "WYPopoverController": [],
        "UIAlertView+Blocks": []
    }
}

Pin It on Pinterest

Share This