ユーザーがリッチ テキスト編集機能のメモを編集する必要があります。次に、ユーザーはこれらのメモを SharePoint に同期します。私の質問は、共有ポイントの列タイプは属性付き文字列の保存をサポートしていますか、それとも NSAttributed 文字列を HTML タグに変換する必要がありますか? SharePoint は、Unicode 文字属性の文字列または HTML ページを列タイプとして格納することをサポートしていますか?
1 に答える
0
NSAttributedStringをNSDatausingに変換しNSKeyedArchiverてアップロードします。
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];
NSAttributedStringサーバーからデータをダウンロードし、次を使用して元に変換します。
NSAttributedString *theAttributedString = [NSKeyedUnarchiver unarchiveObjectWithData:theData];
通常、次NSAttributedStringsの 2 つの形式でアップロードします。
- アーカイブ
NSAttributedStringして、後でまったく同じオブジェクトを取得できるようにします。 NSAttributedStringサーバー側の検索と表示を可能にするのプレーン バージョン。
于 2012-09-18T06:53:12.090 に答える