Hi Amanda,
Syncfusion Greetings!
You can use requestNavigate event of document editor to achieve your requirement.
By default, we have added requestNavigate event for the document editor to navigate to the requested Url.
Please refer the below code snippet, which is defined when initializing the document editor container, which will navigate to the specified URL when clicking on url.
|
onRequestNavigate(args: RequestNavigateEventArgs){
if (args.linkType !== 'Bookmark') { //if the link type is bookmark, please skip. Since this will navigate to the bookmarked content in the document editor.
let link: string = args.navigationLink;
if (args.localReference.length > 0) {
link += '#' + args.localReference;
}
window.open(link);
args.isHandled = true;
}
}
|
you can handle this event in sample level. Please refer the below code snippet.
|
containerInstance.documentEditor.requestNavigate = function(args){ if (args.linkType !== 'Bookmark') {
// Handle your code.
}
} |
Kindly check this and let us know whether this suits your requirement.
Regards,
Harini C