Giter Club home page Giter Club logo

samulle / wordpress-editor-ios-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pzhtpf/wordpress-editor-ios-extension

0.0 2.0 0.0 5.18 MB

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

License: MIT License

Ruby 0.28% Objective-C 46.93% JavaScript 50.86% CSS 1.31% HTML 0.32% C 0.30%

wordpress-editor-ios-extension's Introduction

WordPress-Editor-iOS-Extension

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];

6, 你可以控制title 输入框是否显示

  self.editorView.showTitleField = NO;

7, 你可以@其他人

  [self.editorView atUser:@"@RocTian" url:@"http://www.baidu.com"];

Author

tianpengfei, [email protected]

License

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

wordpress-editor-ios-extension's People

Contributors

pzhtpf avatar

Watchers

James Cloos avatar samulle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.