Skip to content

Feature Request - Hyperlink Activation Event / Custom Link Handling #55

Description

@timgray

The public NavigateUri change in 1.10.3 is working great. I now have hyperlinks saving to Markdown and loading back into AvRichTextBox correctly. I have one more hyperlink integration need that I think could be handled with a very small API addition. My application uses both normal web links and internal application links such as:

gmkeeper://document/

I already plan to disable AvRichTextBox's automatic hyperlink following and let my application handle all activated links itself. What I need is simply a public event that fires when the user activates a hyperlink and gives me the NavigateUri.

Something conceptually like:

HyperlinkActivated
NavigateUri

For example, if the user activates:

https://www.example.com/

My application receives that address and opens the browser itself.

If the user activates:

gmkeeper://document/550e8400-e29b-41d4-a716-446655440000

the app receives that address, recognizes it as an internal document link, and opens the appropriate document inside the application.

The important part is that the activation event would still fire when AvRichTextBox's automatic hyperlink following is set to false. That way AvRichTextBox only needs to report which link was activated. The host application can decide what to do with it, and there is no need to change the existing automatic link-following behavior at all. I can work around this by intercepting pointer events and reproducing the hyperlink hit testing outside the control, but I would much rather avoid coupling the application to AvRichTextBox internals.

The public NavigateUri change solved the storage side cleanly. A simple activation event that passes the link address would solve the other half.

And thanks so much for everything. I very much appreciate all the work you have done.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions