I am using mailcore2 and I have below Scenario.
I want to display html and summary but only want to download the content 1 time, so I decide to load the HTML content and flatten (remove html tags) html to text:
htmlBodyRenderingOperationWithMessage
plainTextBodyRenderingOperationWithMessage
to load the textbody, I want to flatten HTML from the htmlBodyRenderingOperationWithMessage
.Do we have any export function from mailcore2 to flatten HTML to text.
There's a method available in MailCore 2 to "flatten" HTML. You can use:
-[NSString mco_flattenHTML]
It will remove all the html tags and non-visible text from the string.