TextView from HTML with embedded images
TextView from HTML with embedded images
- Subject: TextView from HTML with embedded images
- From: David Sinclair <email@hidden>
- Date: Sun, 22 Sep 2002 23:32:38 -0700
I couldn't find an answer to this in the documentation and archives, so
here goes:
I'm loading a HTML page into a TextView. The page includes some images
using relative URLs, some with absolute. The absolute URL images load
and display fine, but the relative ones don't load.
Can anyone help me make the relative ones work, or is it not possible?
Here's my code, if it helps:
NSURL *pageURL = [NSURL URLWithString:pageString];
NSData *data = [NSData dataWithContentsOfURL:pageURL];
NSAttributedString *bodyAttrString = [[[NSAttributedString alloc]
initWithHTML:data documentAttributes:nil] autorelease];
[[bottomText textStorage]
replaceCharactersInRange:NSMakeRange(0,[[[bottomText textStorage]
string] length]) withAttributedString:bodyAttrString];
--
David Sinclair - email@hidden
http://www.dejal.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.