I have NsTextList and it has [NsTextListElement], I want to replace an NsTextListElement with other element like NsTextParagraph or NstextListElement or an AttributedString. For some reason the below method is not working at all. And I couldn't find any alternate way of replacing the elements
textLayoutManager.replaceContents(in: element.elementRange, with: NSAttributedString(string: "happy"))
Post
Replies
Boosts
Views
Activity
I have added an custom attribute for a paragraph using the below method
textStorage.addAttribute(.customCase, value: "checkList", range: paragraphRange)
When I insert some text in between the text which contains the custom attribute, that text is not inheriting/propagating the custom attribute of existing paragraph text
Old Text : - This is a test
New Text : - This is "some new" a test
The inserted part is not getting the custom attribute of the old text, Can I know why it's happening, Is it some textKit2's behaviour.