File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import type JsEnginePlugin from 'jsEngine/main';
11
11
import type { Validators } from 'jsEngine/utils/Validators' ;
12
12
import { validateAPIArgs } from 'jsEngine/utils/Validators' ;
13
13
import type { App , Plugin } from 'obsidian' ;
14
+ import * as Obsidian from 'obsidian' ;
14
15
import { z } from 'zod' ;
15
16
16
17
export class API {
@@ -95,6 +96,20 @@ export class API {
95
96
return this . app . plugins . getPlugin ( pluginId ) ?? undefined ;
96
97
}
97
98
99
+ /**
100
+ * Gets the obsidian module.
101
+ * This allows you to access all things exported by the obsidian module.
102
+ *
103
+ * @example
104
+ * ```js
105
+ * const obsidian = engine.getObsidianModule();
106
+ * new obsidian.Notice('Hello World!');
107
+ * ```
108
+ */
109
+ public getObsidianModule ( ) : typeof Obsidian {
110
+ return Obsidian ;
111
+ }
112
+
98
113
/**
99
114
* Creates a reactive component.
100
115
* Reactive components are useful for creating dynamic content.
You can’t perform that action at this time.
0 commit comments