I am trying to convert all the strings formatted as "<# Text #>" into tokens in a NSTextView - same behaviour as in Xcode. I have followed the steps given here to add custom attachments in NSTextView but without success. Is there any way to accomplish this behaviour?
Asked
Active
Viewed 175 times
0
-
Have you tested your custom implementation from your link? What is exactly wrong with this example? – Daniyar Nov 02 '15 at 09:16
-
The tokens aren't being rendered correctly for my custom implementation. The tokens are displayed only as wide as a glyph, and are invisible - I am only able to detect them when I use arrow keys to parse through the textView. – Chintan Ghate Nov 02 '15 at 18:44
-
please show us the code – Daniyar Nov 02 '15 at 21:22
-
I am using the exact same code from the post without a custom `NSTextAttachmentCell` class to draw a custom cell. – Chintan Ghate Nov 03 '15 at 12:30
-
Listen Chintan, there's a bit unclear, what "without success" you've got. I'm here to help you, so would you please add some key code with your attachments creating and may be screenshots with failed results? – Daniyar Nov 03 '15 at 15:20
-
Hey thanks for the time Astoria. I found [this thread](http://www.cocoabuilder.com/archive/cocoa/115659-nstextattachmentcell-with-attributed-string-content.html) where the user is having same issue as I am. This solved my issue. – Chintan Ghate Nov 04 '15 at 06:56