diff --git a/Source/CTCoreMessage.h b/Source/CTCoreMessage.h index 1c0faa4..973f8ea 100644 --- a/Source/CTCoreMessage.h +++ b/Source/CTCoreMessage.h @@ -102,6 +102,11 @@ */ - (NSString *)htmlBody; +/*! + @abstract This method returns the editable html body as an NSString. + */ +- (NSString *)editableHtmlBody; + /*! @abstract Returns a message body as an NSString. First attempts to retrieve a plain text body, if that fails then tries for an HTML body. @@ -113,6 +118,8 @@ */ - (void)setBody:(NSString *)body; +- (void) setHTMLBody:(NSString *)body + - (NSArray *)attachments; - (void)addAttachment:(CTCoreAttachment *)attachment; diff --git a/Source/CTCoreMessage.m b/Source/CTCoreMessage.m index bfd1bd9..2ed19f1 100644 --- a/Source/CTCoreMessage.m +++ b/Source/CTCoreMessage.m @@ -39,6 +39,7 @@ #import "CTMIME_MultiPart.h" #import "CTMIME_SinglePart.h" #import "CTBareAttachment.h" +#import "CTMIME_HtmlPart.h" @interface CTCoreMessage (Private) - (CTCoreAddress *)_addressFromMailbox:(struct mailimf_mailbox *)mailbox; @@ -144,6 +145,18 @@ char * etpan_encode_mime_header(char * phrase) return result; } +- (NSString *)editableHtmlBody{ + //added by KK + NSMutableString *result = [NSMutableString string]; + [self _buildUpHtmlBodyText:myParsedMIME result:result]; + NSString *str = [NSString stringWithFormat:@"