Skip to content
프로젝트

소개

재사용 가능한 네이티브 iOS 시각적 HTML 텍스트 편집기 컴포넌트입니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Aztec for iOS: Native HTML Editor

Aztec's Logo'

CircleCI Version License Platform

About Aztec & WordPressEditor

Aztec is a Swift library that provides a UITextView subclass with HTML visual-editing capabilities.

  • Use this library if you want to create an App that interacts with raw HTML content.

WordPressEditor is a Swift library that provides a plugin to make Aztec work with WordPress content.

  • Use this library if you want to create an App that interacts with WordPress HTML content.

Requirements

  • iOS 11 and above
  • Xcode 12 and above

Running the Example App

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.

Integrating the Library with Carthage

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:

  1. Open your project, head to Build Settings for your target and add $(SDKROOT)/usr/include/libxml2/ to your Header Search Paths.
  2. Go to Build Phases > Link Binary With Libraries and add Aztec.framework.
  3. Add import Aztec to your project's source.

Integrating the Library with CocoaPods

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"

Integrating the Library with SPM

Both libraries are available through SPM. To install them, add the package to your package dependencies and the appropriate library to your target dependencies.

let package = Package(
    name: "YourPackage",
    products: [
        .library(name: "YourLibrary", targets: ["YourTarget"]),
    ],
    dependencies: [
        .package(url: "https://github.com/wordpress-mobile/AztecEditor-iOS", .upToNextMajor(from: "1.20.0")),
    ],
    targets: [
        .target(
            name: "YourTarget",
            dependencies: [
                .product(name: "Aztec", package: "AztecEditor-iOS"), // You can choose...
                .product(name: "WordPressEditor", package: "AztecEditor-iOS"), // which library you need.
            ]
        ),
    ]
)

Via Xcode

You can also just use the project repo URL (https://github.com/wordpress-mobile/AztecEditor-iOS) via Xcode!

note: SPM support was added in version 1.20.0, tags prior to that will fail to resolve in SPM.

Usage

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

Contributing

Read our Contributing Guide to learn about reporting issues, contributing code, and more ways to contribute.

Getting in Touch

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.

License

AztecEditor-iOS and WordPress-Editor-iOS are open source projects covered by the Mozilla Public License Version 2.0.

관련 프로젝트 살펴보기

불러오는 중…