Quantcast
Channel: TX Text Control Community
Viewing all articles
Browse latest Browse all 1022

[OPEN] Paste Relative Hyperlinks from IE9+

$
0
0
When I try to paste (ctrl+v) a relative hyperlink from IE9, 10 or 11 into a TX Text Control with the method Paste(), it links to the relative path instead of the full path. With Firefox and chrome it works as intended. The problem seems to be, that IE copies (ctrl+c) the selected content not only as HTML to the clipboard but as RTF as well and TX Text Control seems to prefer RTF by default. The RTF that IE generates only contains the relative path of the hyperlink.
Unfortunately I can't just tell TX Text Control to prefer HTML if there is any HTML content in the clipboard, because Microsoft Word for example also copies it's content as HTML and RTF to the clipboard. If I tell TX Text Control to take the HTML in that case, the text contains unwanted metadata of the HTML.

Example:
root page: http://www.parlament.ch
link: <li><a href="/d/organe-mitglieder/kommissionen/Documents/kommissionssitzungen-quartal.pdf" target="_blank">S�ances des commissions (PDF)</a></li>

If I paste this link from the website into TX Text Control with IE the result is:
Visible text: S�ances des commissions (PDF)
Link to: \d\organe-mitglieder\kommissionen\Documents\kommissionssitzu ngen-quartal.pdf

If I paste from Firefox or Chrome:
Visible text: S�ances des commissions (PDF)
Link to: http://www.parlament.ch/d/organe-mit...en-quartal.pdf

If I paste "hello" from a Word file as ClipboardFormat.HTMLFormat the result is:
l xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
hello

I understand that this more a problem with IE and the Windows clipboard in general. But I was wondering if I'm missing something. Also I'm using a fairly old version of TX Text Control (Version 16.0.900.500) but we'd prefer not to update if not necessary. Is the problem already solved in a newer version?

Viewing all articles
Browse latest Browse all 1022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>