Declared in NSAttributedString+DTRichText.h

Overview

Methods to extend NSAttributedString for use by DTRichTextEditor

Class Methods

attributedStringWithImage:maxDisplaySize:

Create an attributed string with text attachment for an image.

+ (NSAttributedString *)attributedStringWithImage:(UIImage *)image maxDisplaySize:(CGSize)maxDisplaySize

Parameters

image

The image to embed in the attributed string

maxDisplaySize

The maximum display size to allow for the embedded image

Discussion

The maximum display size can be limited to a reasonable size.

Declared In

NSAttributedString+DTRichText.h

attributedStringWithURL:

Creates an attributed string with a hyperlink.

+ (NSAttributedString *)attributedStringWithURL:(NSURL *)URL

Parameters

URL

The NSURL for the hyperlink

Declared In

NSAttributedString+DTRichText.h

Instance Methods

typingAttributesForRange:

Retrieves the attributes that are used if typing starts at this position.

- (NSDictionary *)typingAttributesForRange:(NSRange)range

Parameters

range

The string range to query

Return Value

A dictionary of CoreText attributes suitable for creating an attributed string to insert

Declared In

NSAttributedString+DTRichText.h