Profile Picture

NRichTextView not saving inserted hyperlinks to RTF string

Posted By Tom Galczynski 2 Years Ago

NRichTextView not saving inserted hyperlinks to RTF string

Author
Message
Tom Galczynski
Posted Last Year
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 29, Visits: 87
Hi there.  Tried your suggestion and the Outlook issue persists. :-(  Here is the output from the control:

<!DOCTYPE html> <html> <head><style> br { display: none; } </style> <meta charset="utf-8" /> </head> <body style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"> <section style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;">  <p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;">  <span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">This is the body text.</span>  </p> </section> </body> </html> 

Here is the source from Outlook:
<!DOCTYPE html><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><br><html><br><head><style> br { display: none; } </style><br><br></head><br><body style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"><br><section style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"><br><p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;"><br><span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">This is the body text.</span><br></p><br></section><br></body><br></html><br>

Thanks for your help and Happy New Year :-)


Nevron Support
Posted Last Year
View Quick Profile
Supreme Being

Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)

Group: Forum Members
Last Active: 5 days ago @ 9:07 AM
Posts: 2,963, Visits: 3,364
Hello,

We did some additional research and it appears that Outlook has only partial support for the CSS "display" property. Please try the following CSS and let us know if it fixes the Outlook issues:

br {
  display: none;
  font-size: 0;
  max-height: 0;
  line-height: 0;
  mso-hide: all;
}



Best Regards,
Nevron Support Team



Tom Galczynski
Posted Last Year
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 29, Visits: 87
I really appreciate you guys looking into this.  Thanks!  Unfortunately this did not change the appearance.  Outlook (and Gmail) show blank lines before the body text.  Thunderbird does not.  Here is the output from the control:

<!DOCTYPE html> <html> <head><style> br { display: none; font-size: 0; max-height: 0; line-height: 0; mso-hide: all;} </style> <meta charset="utf-8" /> </head> <body style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"> <section style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;">  <p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;">  <span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">This is the first line of the body of the email.</span>  </p> </section> </body> </html>

And here is the "view source" from Outlook:
<!DOCTYPE html><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><br><html><br><head><style> br { display: none; font-size: 0; max-height: 0; line-height: 0; mso-hide: all;} </style><br><br></head><br><body style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"><br><section style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"><br><p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;"><br><span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">This is the first line of the body of the email.</span><br></p><br></section><br></body><br></html><br>




Nevron Support
Posted Last Year
View Quick Profile
Supreme Being

Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)

Group: Forum Members
Last Active: 5 days ago @ 9:07 AM
Posts: 2,963, Visits: 3,364
Hi Tom. Here's one more idea for you to try: please remove all new lines from the HTML code generated by the NOV Rich Text View before sending the email. Thus the HTML will be on a single line and Outlook should not add all these <br> elements. You can use the following line of code to remove the new lines from the HTML string:

htmlCode = htmlCode.Replace(Environment.NewLine, String.Empty);


Please try this and let us know if it fixed the issue with Outlook.


Best Regards,
Nevron Support Team



Tom Galczynski
Posted Last Year
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 29, Visits: 87
Bingo! That seems to have done it. Here is the html from the control:
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> </head> <body style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"> <section style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"> <p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;">  <span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">First line.</span> </p> <p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;">  <span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">Second line.</span> </p> </section> </body></html>

And here is "view source" from Outlook:
<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"><section style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;margin:0;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;"><p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;"><span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">First line.</span></p><p style="text-align:left;direction:ltr;vertical-align:top;color:#000000;visibility:visible;border-collapse:separate;border-spacing:0 0;border:none;font:normal normal 10pt/1 'Arial',sans-serif;text-decoration:none;padding:0;clear:none;float:none;text-indent:0;page-break-before:auto;page-break-after:auto;position:static;margin:8px 0;"><span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">Second line.</span></p></section></body></html>

Also looks fine in Gmail and Thunderbird.  Thanks very much! :-)


Nevron Support
Posted Last Year
View Quick Profile
Supreme Being

Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)Supreme Being (4,091 reputation)

Group: Forum Members
Last Active: 5 days ago @ 9:07 AM
Posts: 2,963, Visits: 3,364
That's great. You can also remove the <style> element from the <head> element of the document. It shouldn't be necessary anymore.


Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic