NRichTextView not saving inserted hyperlinks to RTF string


Author
Message
Tom Galczynski
Tom Galczynski
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
Posts: 29, Visits: 87
Hello. I'm using the NRichTextView control and am trying to insert a hyperlink into my document and saved it to RTF.  The hyperlink is fine (shows up as a link) in my document, but when I save it to rtf string/file, the link is lost. I've attached the resulting rtf file which in the control was just two lines "test text" and "test link" which the latter was a hyperlink to www.asdsoftware.com.  After saving to RTF the hyperlink is gone.

Previously I posted about an issue with saving tables to RTF and you resolved that by having me add document.Evaluate() prior to my call to SaveToStream. Maybe there is something similar to fix this?

Thanks!



Attachments
rtfwithlink.rtf (457 views, 7.00 KB)
Replies
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hello,

We would like to inform you that Nevron Open Vision 2019.1 is now live. For more information about the new features and improvements in this release, please visit:
https://www.nevron.com/company-news-and-events.aspx

Regarding the issue with the HTML in Outlook, maybe Outlook does not support CSS classes properly. Please instruct the NOV rich text control to inline the CSS styles into the HTML tags. For an example, check out the following documentation topic (see the last code example):
NOV Rich Text - HTML Import and Export


Best Regards,
Nevron Support Team


Tom Galczynski
Tom Galczynski
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
Posts: 29, Visits: 87
Thanks for the inline CSS tip.  We are getting closer!  However there seems to be persistent blank lines at the top of the message and I am not sure what is causing it.  Here is a picture of what it looks like now followed by the html string:
https://www.nevron.com/forum/uploads/images/365b32d3-91ce-4bbf-9769-67ea.png
<!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;">This is a test of hyperlink </span><a href="http://www.asdsoftware.com" target="_self" style="visibility:visible;border:none;font:normal normal 10pt/normal 'Arial',sans-serif;color:#0000ff;text-decoration:underline;">here</a><span style="color:#000000;visibility:visible;border:none;text-decoration:none;font:normal normal 10pt/normal 'Arial',sans-serif;">.</span>
</p>
</section>
</body>
</html>

Is there some other save setting perhaps I can try to eliminate those blank lines?  The html code opened up in a browser and also in the Nevron control doesn't show those blank lines at all so I'm thinking it is due to some auto-formatting aspect perhaps???

Thanks so much for your help!

Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hello,

We created an HTML file with your HTML code and it works fine in all browsers, including Internet Explorer 11 as shown below:
https://www.nevron.com/forum/uploads/images/c4e8d12c-94ad-4675-98ef-8fb7.png
Maybe Outlook centers the content vertically and that is why it looks like on your screenshot. You can test this by adding a border to the paragraph element. You can do this either in the original document or in the style attribute of the p tag by replacing "border: none " with "border:2px solid red;".


Best Regards,
Nevron Support Team


Tom Galczynski
Tom Galczynski
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
Posts: 29, Visits: 87
Hi.  I tried your suggestion and the email message displays the same way, with a border around the text.  And it's not just Outlook. Thunderbird also shows the text the same way, with several blank lines first.  Very strange.

Thanks for your help!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Tom Galczynski - 6 Years Ago
Nevron Support - 6 Years Ago
Tom Galczynski - 6 Years Ago
Tom Galczynski - 6 Years Ago
Nevron Support - 6 Years Ago
Nevron Support - 6 Years Ago
Tom Galczynski - 6 Years Ago
Nevron Support - 6 Years Ago
                         Thanks for the inline CSS tip. We are getting closer! However there...
Tom Galczynski - 6 Years Ago
                             Hello, We created an HTML file with your HTML code and it works fine...
Nevron Support - 6 Years Ago
                                 Hi. I tried your suggestion and the email message displays the same...
Tom Galczynski - 6 Years Ago
Nevron Support - 6 Years Ago
Tom Galczynski - 6 Years Ago
Nevron Support - 6 Years Ago
Tom Galczynski - 6 Years Ago
                         Hello, Maybe the email clients have some non-standard default CSS...
Nevron Support - 6 Years Ago
Tom Galczynski - 6 Years Ago
Nevron Support - 6 Years Ago
Tom Galczynski - 6 Years Ago
Nevron Support - 5 Years Ago
                         Hi there. Tried your suggestion and the Outlook issue persists. :-(...
Tom Galczynski - 5 Years Ago
                             Hello, We did some additional research and it appears that Outlook...
Nevron Support - 5 Years Ago
                                 I really appreciate you guys looking into this. Thanks! Unfortunately...
Tom Galczynski - 5 Years Ago
                                     Hi Tom. Here's one more idea for you to try: please remove all new...
Nevron Support - 5 Years Ago
                                         Bingo! That seems to have done it. Here is the html from the control:...
Tom Galczynski - 5 Years Ago
                                             That's great. You can also remove the <style> element from the...
Nevron Support - 5 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search