In my app I want to provide bookmarks for text in NSTextView. Should I use RTF bookmarks? And if so, how to determine their position later?
What options are possible to solve this problem?
See the Attributed String Programming Guide and the Text Attribute Programming Guide. You can set standard or custom attributes attributed strings (which NSTextView consumes) for a given range. You can also use an NSTextAttachment to show some sort of visible "anchor". Scroll the range of the attribute run or attachment to visible when the "bookmark" is selected.
Really, the sky is the limit in terms of "style". It just depends on what you're trying to do and how much functionality you want.