I have an NSTextView which is being populated using RTF:

    if ([self getContent:@"RTF"]&&useformatting)
    {
        [attributedContent appendAttributedString:[[NSAttributedString alloc] 
initWithRTF:[self getContent:@"RTF"] documentAttributes:NULL]];
    }

This works beautifully except that the RTF string references images:

{\*\htmltag84 <img border=0 width=224 height=51 id="_x0000_i1033" 
src="cid:image001.jpg@01CE8098.AD1C4B20" alt="LH_logo600r1idx">}\htmlrtf 
{\chbrdr\brdrsh LH_logo600r1idx}\htmlrtf0

I would like to make sure that the images are placed into the RTF correctly.  I 
thought I might be able to do it by saving the image to a cache folder and 
specifying a root (as WebKit's loadHTMLString does), but this isn't available 
in NSTextView or NSMutable String.

Second, I wondered if there's a way of getting the index of the last displayed 
character before the image from the RTF itself.

Does anyone have any ideas how this might be achieved?  As usual, all 
assistance gratefully received!

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to