Skip to content

Commit d1146bb

Browse files
committed
Make available method to extract HTML from a string.
1 parent 6c4e208 commit d1146bb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Aztec/Classes/TextKit/TextStorage.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,10 @@ open class TextStorage: NSTextStorage {
369369
open func getHTML(prettify: Bool = false, range: NSRange) -> String {
370370
return htmlConverter.html(from: self.attributedSubstring(from: range), prettify: prettify)
371371
}
372+
373+
open func getHTML(prettify: Bool = false, from attributedString: NSAttributedString) -> String {
374+
return htmlConverter.html(from: attributedString, prettify: prettify)
375+
}
372376

373377
func setHTML(_ html: String, defaultAttributes: [NSAttributedString.Key: Any]) {
374378
let originalLength = length

0 commit comments

Comments
 (0)