The `self.typingAttributes` will crash app in iOS6, it should be a bug o...

...f iOS6. Since typingAttributes only available in editing mode, checking editing mode previously will fix the bug.