Current I am before inserting a hyperlink, I will check on the caret position whether it is an hyperlink or not, after users have fill in the required hyperlink details like display text and the address, if the current item is a hyperlink I will call SetItemTagEd to update the tag of the hyperlink but if current iten is not a hyperlink I will call InsertStringTag to create a new hyperlink.
Example:
in the RVE there is a hyperlink with display text: Go Google and the address is: http://www.google.com. When user right click on the hyperlink I will allow user to edit the hyperlink details, from the demo given by RichView it will disable the Display Text field so that user can only edit the address while display remain unchanged. My problem is I will allow users to change the display text as well. So after changed, by calling SetItemTagEd I can only update the tag but not the display text. Now I was trying to do something when I have detected the display text has been changed then I will call InsertStringTag to recreate a new hyperlink rather than calling SetItemTagEd to update the hyperlink. It works anyway, but I am just wondering whether is this a correct implemetation? Any other better way of implementing it?
Hyperlink Help
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can study the source code of TRVActionInsertHyperlink in RichViewActions http://www.trichview.com/resources/actions/