Aztec for iOS: Native HTML Editor
About Aztec
Aztec is a Swift library that provides a UITextView
subclass with HTML visual-editing capabilities.
Requirements
- iOS 9 and above
- Xcode 9.3 and above
Running the Example App
To run the Example app, you first need to make sure its dependencies are installed:
- Make sure you have Carthage installed (we're currently using version 0.23.0).
- Using the command line:
cd Example
carthage update --platform iOS
Once Carthage finishes, you should open the file Aztec.xcworkspace
from the root directory of Aztec.
Make sure the AztecExample
target it selected, and press CMD + R to run it.
Integrating the Library with Carthage
WordPress-Aztec-iOS is available through Carthage. To install it, simply add the following line to your Cartfile:
github "wordpress-mobile/AztecEditor-iOS" "develop"
Follow these instructions to build Aztec.framework
.
Then:
- Open your project, head to Build Settings for your target and add
$(SDKROOT)/usr/include/libxml2/
to your Header Search Paths. - Go to
Build Phases
>Link Binary With Libraries
and addAztec.framework
. - Add
import Aztec
to your project's source.
Integrating the Library with CocoaPods
WordPress-Aztec-iOS is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "WordPress-Aztec-iOS"
Usage
After installing Aztec, import the module and use the Aztec.TextView
view:
import Aztec
// ...
let textView = Aztec.TextView(
defaultFont: UIFont,
defaultParagraphStyle: ParagraphStyle = ParagraphStyle.default,
defaultMissingImage: UIImage) {
License
WordPress-Aztec-iOS is available under the GPLv2 license. See the LICENSE file for more info.