Alex Rivera | Logout

Set contents of webview to html string (cocoa)

Asked 2009-11-05T04:30:20.820
19

Is there any easy way to set the contents of a webview to an HTML string (without having to load a file)?

Thanks

Edit
Report

1 Answer

52

[[webView mainFrame] loadHTMLString:htmlString baseURL:someURL];

(Where someURL is used to resolve relative URLs in the HTML source.)

answered 2009-11-05T04:36:58.493

Your Answer