You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I've figured out what is happening so this is more of a "is there a workaround" issue.
One of our use cases is converting an email to HTML (via the getHTMLText function on the Email class) and display it in a browser. With the latest update of rtf-to-html the HTML is now wrapped with a <pre style="white-space:pre-wrap">. While this does preserve line breaks, it also adds the default browser styles for pre tags:
Especially the font-family: monospace; completely changes how the mail is displayed since it overrides the font from the one we provide with whatever monospace font is available on the system.
I also can't just add a style for the pre tag since (as far I've seen) when using the getHTMLText function I have no way of knowing if the original mail is an RTF or a HTML mail. Adding this style would possibly change the font of a pre tag inside an HTML mail, where a monospace font is wanted. My current idea is looking for <pre style="white-space:pre-wrap"> and replace it with a span. Do you have any input on how to make this work?
I think I've figured out what is happening so this is more of a "is there a workaround" issue.
One of our use cases is converting an email to HTML (via the getHTMLText function on the Email class) and display it in a browser. With the latest update of rtf-to-html the HTML is now wrapped with a
<pre style="white-space:pre-wrap">. While this does preserve line breaks, it also adds the default browser styles for pre tags:Especially the
font-family: monospace;completely changes how the mail is displayed since it overrides the font from the one we provide with whatever monospace font is available on the system.I also can't just add a style for the pre tag since (as far I've seen) when using the getHTMLText function I have no way of knowing if the original mail is an RTF or a HTML mail. Adding this style would possibly change the font of a pre tag inside an HTML mail, where a monospace font is wanted. My current idea is looking for
<pre style="white-space:pre-wrap">and replace it with a span. Do you have any input on how to make this work?