initWithMarkdown:options:baseURL:error:
Creates an attributed string from Markdown-formatted data using the provided options.
Declaration
- (instancetype) initWithMarkdown:(NSData *) markdown options:(NSAttributedStringMarkdownParsingOptions *) options baseURL:(NSURL *) baseURL error:(NSError **) error;Parameters
- markdown:
The Nsdata instance that contains the Markdown formatting.
- options:
Options that affect how the initializer interprets formatting in the Markdown string. This parameter defaults to no options.
- baseURL:
The base URL to use when resolving Markdown URLs. The initializer treats URLs as being relative to this URL. If this value is
nil, the initializer doesn’t resolve URLs. The default isnil. - error:
On input, a pointer to an error object. On return, if an error occurs, this pointer contains an actual error object with the error information. You may specify
nilfor this parameter if you don’t want the error information.
Return Value
An attributed string with the parsed Markdown text and styling, or nil if parsing the data fails.