Skip to content

A really simple extension of UIWebView to give developers the option to load Markdown instead of HTML, and specify a stylesheet.

License

Notifications You must be signed in to change notification settings

lisa820522/UIWebView-Markdown

Repository files navigation

UIWebView-Markdown

A really simple Category for UIWebView to give developers the option to load Markdown instead of HTML, and specify a stylesheet.

This Category is so simple, your cat could use it. Want to load some Markdown on a UIWebView instead of HTML? Check this out, it's a simple ViewController with a UIWebView reference, webView.

#import "MYSuperSimpleViewController.h"
#import "UIWebView+Markdown.h"

@implementation MYSuperSimpleViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.webView loadMarkdownString:@"# How to Write Markdown\n* Start with some bullet points\n* Crucially, you want to **emphasis** the _important_ points"];
}

@end

Seriously, that's all you need to get started.

Check out the comments in UIWebView+Markdown.h if you want to see the other options, such as specifying CSS, or a Stylesheet.

And if you want more information about Markdown, see http://daringfireball.net/projects/markdown/.

About

A really simple extension of UIWebView to give developers the option to load Markdown instead of HTML, and specify a stylesheet.

Resources

License

Stars

Watchers

Forks

Packages

No packages published