From 4fde54aa5b71ae92048303f37e9da775889d0cc4 Mon Sep 17 00:00:00 2001 From: Yozone Wang Date: Tue, 28 Nov 2017 15:19:37 +0800 Subject: [PATCH] TextView: Export init, setHTML and getHTML methods to Objective-C --- Aztec/Classes/TextKit/TextView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Aztec/Classes/TextKit/TextView.swift b/Aztec/Classes/TextKit/TextView.swift index 46b77d4d2..71437a56d 100644 --- a/Aztec/Classes/TextKit/TextView.swift +++ b/Aztec/Classes/TextKit/TextView.swift @@ -295,7 +295,7 @@ open class TextView: UITextView { // MARK: - Init & deinit - public init( + @objc public init( defaultFont: UIFont, defaultParagraphStyle: ParagraphStyle = ParagraphStyle.default, defaultMissingImage: UIImage) { @@ -606,7 +606,7 @@ open class TextView: UITextView { /// /// - Returns: The HTML version of the current Attributed String. /// - public func getHTML() -> String { + @objc public func getHTML() -> String { let pristineHTML = storage.getHTML(serializer: outputSerializer) let processedHTML = outputProcessor?.process(pristineHTML) ?? pristineHTML @@ -617,7 +617,7 @@ open class TextView: UITextView { /// /// - Parameter html: The raw HTML we'd be editing. /// - public func setHTML(_ html: String) { + @objc public func setHTML(_ html: String) { let processedHTML = inputProcessor?.process(html) ?? html // NOTE: there's a bug in UIKit that causes the textView's font to be changed under certain