Skip to content

🐬A high-performance rich editor develop with swift on iOS platform, based on TextKit.

License

Notifications You must be signed in to change notification settings

terenzeyuen/NCKTextView

 
 

Repository files navigation

NCKTextView

[![CI Status](http://img.shields.io/travis/Chanricle King/NCKTextView.svg?style=flat)](https://travis-ci.org/Chanricle King/NCKTextView) Version License Platform

NCKTextView is a very high-performance rich editor. Because it's a subclass of UITextView, not UIWebView. All of code by TextKit framework.

Features

  • Bold Text
  • Italic Text
  • Unordered List
  • Ordered List
  • List auto indentation
  • Undo and Redo
  • Rich Text Copy & Paste

Usage

Not extends any class, not EditorController and so on...

You can embed NCKTextView to anywhere that you want.

// Init TextView
let textView = NCKTextView(frame: self.view.bounds, textContainer: NSTextContainer())

// If you want to use built-in toolbar, call it.
textView.enableToolbar()

// add to View
self.view.addSubview(textView)

Done.

UITextViewDelegate

Some feature I use delegate method, so NCKTextView is delegate self. And provide another delegate property named nck_delegate

public var nck_delegate: UITextViewDelegate?

Example

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

demo

Requirements

Xcode 7.3 +

Swift 2.2 +

Installation

###Stable source code

git clone -b stable https://github.com/chanricle/NCKTextView.git

###Cocoapods

NCKTextView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "NCKTextView"

Author

Chanricle King, [email protected]

License

NCKTextView is available under the MIT license. See the LICENSE file for more info.

About

🐬A high-performance rich editor develop with swift on iOS platform, based on TextKit.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 76.5%
  • Shell 20.2%
  • Ruby 2.2%
  • Objective-C 1.1%