Aztec is a Swift library that provides a UITextView
subclass with HTML visual-editing capabilities.
WordPressEditor is a Swift library that provides a plugin to make Aztec work with WordPress content.
To run the Example app, you first 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.
Both libraries are available through Carthage. To install it, simply add the following line to your Cartfile:
github "wordpress-mobile/AztecEditor-iOS" "1.0" # or the version number you want
github "wordpress-mobile/WordPressEditor-iOS" "1.0"
Follow these instructions to add Aztec.framework
or WordPressEditor.framework
to your App.
Then:
$(SDKROOT)/usr/include/libxml2/
to your Header Search Paths.Build Phases
> Link Binary With Libraries
and add Aztec.framework
.import Aztec
to your project's source.Both libraries are available through CocoaPods. To install them, simply add the following lines to your Podfile:
pod "WordPress-Aztec-iOS", "1.0" # or the version number you want
pod "WordPress-Editor-iOS", "1.0"
After installing Aztec, import the module and use the Aztec.TextView
view as shown below:
import Aztec
// ...
let textView = Aztec.TextView(
defaultFont: UIFont,
defaultParagraphStyle: ParagraphStyle = ParagraphStyle.default,
defaultMissingImage: UIImage) {
Read our Contributing Guide to learn about reporting issues, contributing code, and more ways to contribute.
If you have questions about getting setup or just want to say hi, join the WordPress Slack and drop a message on the #mobile
channel.
AztecEditor-iOS and WordPress-Editor-iOS are open source projects covered by the Mozilla Public License Version 2.0.