Open srinivas-kurakula opened 6 years ago
Below is the code to generate an AttributedString in iOS
NSString markdown = @"" CMDocument doc = [[CMDocument alloc] initWithData: [markdown dataUsingEncoding: NSUTF8StringEncoding] options: 0]; CMTextAttributes markdownAttributes = [[CMTextAttributes alloc]init]; CMAttributedStringRenderer renderer = [[CMAttributedStringRenderer alloc] initWithDocument: doc attributes: markdownAttributes]; return [render render];
Below is the code to generate an AttributedString in iOS
NSString markdown = @""
CMDocument doc = [[CMDocument alloc] initWithData: [markdown dataUsingEncoding: NSUTF8StringEncoding] options: 0];
CMTextAttributes markdownAttributes = [[CMTextAttributes alloc]init];
CMAttributedStringRenderer renderer = [[CMAttributedStringRenderer alloc] initWithDocument: doc attributes: markdownAttributes];
return [render render];