Skip to content

Commit 3267df4

Browse files
committed
fix typos in API guide
1 parent 3c83401 commit 3267df4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/docs/guides/api.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ Not handling the lifecycle of mountable objects can lead to memory leaks and oth
9090
Lifecycle management is very important when working with the Meta Bind API. You need to make sure that you clean up after yourself to prevent memory leaks and other bugs.
9191
9292
Most things that need lifecycle managment inherit from [`Mountable`](/obsidian-meta-bind-plugin-docs/api/classes/mountable), which has a `mount` and `unmount` method.
93-
If you call `mount` you nned to also call `unmount` at some point.
93+
If you call `mount`, you need to call `unmount` at some point.
9494
95-
The API also provides a helper function called `wrapInMDRC` that can be used to handle the lifecycle of a mountable object for you.
95+
The API provides a helper function called `wrapInMDRC` that can be used to handle the lifecycle of a mountable object for you.
9696
9797
```js
9898
// Create a mountable object.
@@ -105,7 +105,7 @@ mb.wrapInMDRC(mountable, container, component);
105105
```
106106
107107
In the background this will create a [`MarkdownRenderChild`](https://docs.obsidian.md/Reference/TypeScript+API/MarkdownRenderChild)
108-
which mounts and unmounts the mountable on load and unload respectivly and then registers that as a child of the component.
108+
which mounts and unmounts the mountable on load and unload respectivly and then registers that [`MarkdownRenderChild`](https://docs.obsidian.md/Reference/TypeScript+API/MarkdownRenderChild) as a child of the component.
109109
110110
You can also handle the lifecycle yourself by mounting the mountable to the DOM and then registering a callback to unmount it when the component is destroyed.
111111
@@ -123,8 +123,8 @@ component.register(() => mountable.unmount());
123123
124124
:::note
125125
The following examples use `js-engine` code blocks from the [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) plugin.
126-
To use the examples as they are, make sure you have the [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) plugin installed and enabled
127-
Though the API is usable without it, the examples might not work without it.
126+
To use the examples as they are, make sure you have the [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin) plugin installed and enabled.
127+
Though the API is usable without it, the examples might not work without [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin).
128128
129129
The used globals that are exclusive to JS Engine are as follows.
130130
For more information on them refer to the [JS Engine documentation](https://www.moritzjung.dev/obsidian-js-engine-plugin-docs/api/interfaces/jsexecutionglobals/).

0 commit comments

Comments
 (0)