I am getting following text from server.
"<span class='quill-mention' data-name='@Saurabh Shah
(5327)' data-id='859155' user-id='859155'>@Saurabh Shah
(5327)</span> Test";
I want to make it like @Saurabh Shah Test
With @Saurabh Shah as Blue color font.
Currently I am using following code :
NSMutableAttributedString *attribute = [[NSMutableAttributedString alloc] initWithData:
[self.message dataUsingEncoding:NSUTF8StringEncoding] options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: [NSNumber numberWithInt:NSUTF8StringEncoding]} documentAttributes:nil error:nil];
That gives me string : @Saurabh Shah Test. But not blue color.
How can i do it?
Try to use this in your options:NSForegroundColorAttributeName