1.NSAttributedString 2.将图片生成一个NSTextAttachment -> 生成NSAttibutedString->将生成出来的attire添加到原来的NSMutableAttributedString 3.NSAttributedString->append/insert/replace 4.调整光标的位置-->selectedRange(选中的范围)