Declared in NSMutableDictionary+DTRichText.h

Overview

Convenience methods to execute typical editing actions on a CoreText attribute dictionary.

Instance Methods

removeAttachment

Removes the attributes related to a DTTextAttachment from the receiver

- (void)removeAttachment

Declared In

NSMutableDictionary+DTRichText.h

removeListPrefixField

Removes list prefix field from the receiver

- (void)removeListPrefixField

Declared In

NSMutableDictionary+DTRichText.h

removeUnderlineStyle

Removes the underline style from the receiver

- (void)removeUnderlineStyle

Declared In

NSMutableDictionary+DTRichText.h

setFontFromFontDescriptor:

Updates the font attribute via a font descriptor

- (void)setFontFromFontDescriptor:(DTCoreTextFontDescriptor *)fontDescriptor

Parameters

fontDescriptor

The font descriptor which describes the font to set

Declared In

NSMutableDictionary+DTRichText.h

setForegroundColor:

Sets the text foreground color to the given color.

- (void)setForegroundColor:(UIColor *)color

Parameters

color

The color to set or nil to restore the default black text color

Declared In

NSMutableDictionary+DTRichText.h

toggleBold

Toggle the attributes in the receiver bold. If font is already bold then it will be made normal.

- (void)toggleBold

Declared In

NSMutableDictionary+DTRichText.h

toggleHighlightWithColor:

Toggles the background color to the given color. If the attributes are already containing a highlight then it is removed

- (void)toggleHighlightWithColor:(UIColor *)color

Parameters

color

The color to highlight with. If there is a previous highlight then this parameter is ignored

Declared In

NSMutableDictionary+DTRichText.h

toggleItalic

Toggle the attributes in the receiver italic. If font is already italic then it will be made normal.

- (void)toggleItalic

Declared In

NSMutableDictionary+DTRichText.h

toggleStrikethrough

Toggle the attributes in the receiver strikethrough. If text is already marked as strikethrough then the strikethrough is removed.

- (void)toggleStrikethrough

Declared In

NSMutableDictionary+DTRichText.h

toggleUnderline

Toggle the attributes in the receiver underline. If text is already marked as underline then the underline is removed.

- (void)toggleUnderline

Declared In

NSMutableDictionary+DTRichText.h

updateParagraphSpacing:

Updates the paragraph spacing to a given amount

- (void)updateParagraphSpacing:(CGFloat)paragraphSpacing

Parameters

paragraphSpacing

The new space after paragraphs to apply

Declared In

NSMutableDictionary+DTRichText.h