Make selected string of text view Bold, Italic, Underline like native “Notes” app of iOS

后端 未结 3 1942
北海茫月
北海茫月 2021-01-16 03:32

Is there any help to make selected string of text view Bold, Italic, Underline like native \"Notes\" app of iOS. Please give me helpful links. I am tired of searching for th

3条回答
  •  长情又很酷
    2021-01-16 04:03

    Although the question is old but it may helps someone.

    Using NSMutableAttributedString won't solve the problem, because if you type any where before the customised text the range will be different. Therefore, the customisation will shift to satisfy the updated range. I think using HTML is better solution if you would have a very long string. You may consider using some open source libraries, like ZSSRichTextEditor Hope that help.

提交回复
热议问题