tags:

views:

140

answers:

1

How do I pass HTML code contained in a NSString directly into WebKit. I'm looking for something similar to:

[aNSTextField setString:@"foo"];

Would it be as simple as something like that? Or would I have to resort to something like saving the text to a file and then accessing it with a file:// url?

+4  A: 

Assuming you have a WebView:

[[myWebView mainFrame] loadHTMLString:myHTMLString baseURL:myBaseURL];
Jason Coco