I have requirement where user edits notes for Rich text editing features. Then user syncs these notes to sharepoint. My question is, does sharepoint column type support storing an attributed string OR I would have to convert NSAttributed strings to HTML tags ? Does sharepoint support storing unicode character attributed strings OR HTML pages as column type
Convert the NSAttributedString
to NSData
using NSKeyedArchiver
and upload:
NSString *theString = @"Example";
NSDictionary *theAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSFont fontWithName:@"Helvetica" size:26], NSFontAttributeName,
[NSColor whiteColor], NSForegroundColorAttributeName, nil];
NSAttributedString *theAttributedString = [[NSAttributedString alloc]
initWithString:theString
attributes: theAttributes];
NSData *theData = [NSKeyedArchiver archivedDataWithRootObject:theAttributedString];
Download the data from the server and convert it back to the NSAttributedString
using:
NSAttributedString *theAttributedString = [NSKeyedUnarchiver unarchiveObjectWithData:theData];
Generally I upload NSAttributedStrings
in two formats:
NSAttributedString
to make sure I can later retrieve exactly the same object.NSAttributedString
to allow search and display server side.