Code refactoring
Use spellCheckingType instead of autocorrectionType to enable/disable spell checking
Autocorrection is working again
Fixed cursor position after text replacement
Update cursor location on attributedText change