Sometimes you want to use all the power of NSTextView with all formatting style and everything.
var htmlAttr = new NSAttributedStringDocumentAttributes () { DocumentType = NSDocumentType.HTML }; var range = new NSRange (0, txtNoteView.TextStorage.Length); var att = txtNoteView.AttributedString; var error = new NSError (); var html = txtNoteView.TextStorage.GetData (range, htmlAttr,out error);
The html obj now have the whole string formated as HTML
Latest posts by Starlin González (see all)
- Learning Swift - June 11, 2024
- How to read Bearer Tokens Claims in dotnetcore - August 23, 2023
- Fetching emails with MailKit - October 31, 2020