Hi Sergey,
We have a problem with copy/paste custom URL protocol links generated by custom URI Scheme.
https://docs.microsoft.com/en-us/previo ... dfrom=MSDN
Custom link generated by our system in HTML format and look like
koper3:&OBJECT_LINK=659FFA4A-B844-4D3C-954E-87B253E3DAB4&firm=100100001530617&db=7777
Then we paste generated link from clipboard in TRichView all OK.
Then we paste generated link from clipboard in MS Word/Outlook all OK.
Then we copy link from TRichView and paste in MS programs or TRichView all OK.
But when we copy link from MS Word and try to paste in TRichView the link make broken.
Depending on which directory the file is in (for example "С:\"), the file path is added to the link and link look like
C:\koper3:&OBJECT_LINK=659FFA4A-B844-4D3C-954E-87B253E3DAB4&firm=100100001530617&db=7777
A big request for help to deal with this problem.
Test Word file with link in attachment.
Thank in advance.
Custom URL Copy and Paste problem
Custom URL Copy and Paste problem
- Attachments
-
- test.docx
- (11.42 KiB) Downloaded 570 times
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Custom URL Copy and Paste problem
TRichView does not recognize this link as URL, so it thinks that it is a relative path and adds a base path to it.
Solutions:
1) Assign RichViewEdit.RTFReadProperties.BasePathLinks = False.
In this mode, the editor never adds base path to links
2) Assign your function to RVIsCustomURL variable (defined in RVFileFuncs unit).
The function must be like this:
If Word contains your URL, this function must return True.
Solutions:
1) Assign RichViewEdit.RTFReadProperties.BasePathLinks = False.
In this mode, the editor never adds base path to links
2) Assign your function to RVIsCustomURL variable (defined in RVFileFuncs unit).
The function must be like this:
Code: Select all
type
TCustomRVIsURLFunction = function(const Word: TRVUnicodeString): Boolean;