lib/cocoa/sugarcube-attributedstring/nsattributedstring.rb in sugarcube-2.11.1 vs lib/cocoa/sugarcube-attributedstring/nsattributedstring.rb in sugarcube-2.12.0

- old
+ new

@@ -6,10 +6,15 @@ def attrd(attributes={}) self.nsattributedstring(attributes) end + def attributed_html + options = {NSDocumentTypeDocumentAttribute => NSHTMLTextDocumentType} + NSAttributedString.alloc.initWithData(self.dataUsingEncoding(NSUTF8StringEncoding), options:options, documentAttributes:nil, error:nil) + end + end class NSMutableString @@ -37,9 +42,11 @@ NSShadowAttributeName NSVerticalGlyphFormAttributeName # new iOS 7 text effects NSTextEffectAttributeName NSTextEffectLetterpressStyle + NSRTFDTextDocumentType + NSHTMLTextDocumentType # make sure alignments get compiled NSLeftTextAlignment NSRightTextAlignment NSCenterTextAlignment NSJustifiedTextAlignment