diff --git a/app/views/loc-badge.js b/app/views/loc-badge.js
index ca1c829..0065c60 100644
--- a/app/views/loc-badge.js
+++ b/app/views/loc-badge.js
@@ -3,5 +3,9 @@ discovery.view.define('loc-badge', {
className: 'function-loc',
data: 'function or $ | marker("function").object |? { ..., text: loc }',
whenData: 'text',
- content: 'html:text.split(/:/).join(`:`)'
+ content: 'html:text.split(/:/).join(`:`)',
+ postRender(el, _, data) {
+ // Support a injectable custom function to provide custom action to open in editor
+ window.handleOpenInEditor?.(el, data.module.path + data.text);
+ }
}, { tag: false });