Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/concepts/plugin-anatomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default class ExamplePlugin extends Plugin {
}
```

Notice the line `class ExamplePlugin extends Plugin`. This means that `ExamplePlugin` is an instance of the class `Plugin`. In a next couple pages, you will occasionally meet the syntax `this.doSomeThing`. For example: `this.addRibbonIcon`, `this.addCommand`. Because we are inside the class block, so `this` in here refers to the instance `ExamplePlugin`. `this.addRibbonIcon` mean that you `addRibbonIcon` to `ExamplePlugin`. Click these links to learn more about JavaScript [class](https://dmitripavlutin.com/javascript-classes-complete-guide/#41-instance-methods "The Complete Guide to JavaScript Classes") and [`this`](https://dmitripavlutin.com/gentle-explanation-of-this-in-javascript/#41-this-in-a-constructor-invocation "Gentle Explanation of "this" in JavaScript") syntax.

## Plugin lifecycle

[`onload()`](../api/classes/Component.md#onload) runs whenever Obsidian the user starts using the plugin. This is where you'll configure most of the plugin's capabilities.
Expand Down