Instance Method


Fixes the paragraph style attributes in aRange, assigning the first paragraph style attribute value in each paragraph to all characters of the paragraph.


- (void)fixParagraphStyleAttributeInRange:(NSRange)range;



The range of characters.


This method extends the range as needed to cover the last paragraph partially contained. A paragraph is delimited by any of these characters, the longest possible sequence being preferred to any shorter:

  • U+000D (\r or CR)

  • U+000A (\n or LF)

  • U+2029 (Unicode paragraph separator) \r\n, in that order (also known as CRLF)

Raises an NSRangeException if any part of aRange lies beyond the end of the receiver’s characters.

See Also

Fixing attributes after changes

- fixAttributesInRange:

Cleans up font, paragraph style, and attachment attributes within the given range.

- fixAttachmentAttributeInRange:

Cleans up attachment attributes in aRange, removing all attachment attributes assigned to characters other than NSAttachmentCharacter.

- fixFontAttributeInRange:

Fixes the font attribute in aRange, assigning default fonts to characters with illegal fonts for their scripts and otherwise correcting font attribute assignments.