You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Plugins: Add support for editor plugins (#11296)
This commit is contained in:
@@ -180,6 +180,10 @@ export default class Plugin {
|
||||
this.viewControllers_[v.handle] = v;
|
||||
}
|
||||
|
||||
public hasViewController(handle: ViewHandle) {
|
||||
return !!this.viewControllers_[handle];
|
||||
}
|
||||
|
||||
public viewController(handle: ViewHandle): ViewController {
|
||||
if (!this.viewControllers_[handle]) throw new Error(`View not found: ${handle}`);
|
||||
return this.viewControllers_[handle];
|
||||
|
||||
Reference in New Issue
Block a user