Skip to content

Build your personal knowledge base with Trilium Notes

feat(client/bundle): expose Trilium hooks

Elian Doran2c25786fa238
diff --git a/apps/client/src/services/frontend_script_api_preact.ts b/apps/client/src/services/frontend_script_api_preact.ts
index 3709abab82..4086fc88cf 100644
--- a/apps/client/src/services/frontend_script_api_preact.ts
+++ b/apps/client/src/services/frontend_script_api_preact.ts
@@ -1,6 +1,7 @@
import { Fragment, h, VNode } from "preact";
import * as hooks from "preact/hooks";
+import * as triliumHooks from "../widgets/react/hooks";
import RightPanelWidget from "../widgets/sidebar/RightPanelWidget";
export interface WidgetDefinition {
@@ -31,5 +32,6 @@ export const preactAPI = Object.freeze({
RightPanelWidget,
- ...hooks
+ ...hooks,
+ ...triliumHooks
});