# Questions and findings on plugin API

**URL:** <https://discourse.joplinapp.org/t/questions-and-findings-on-plugin-api/12384>\
**Category:** Plugins\
**Created:** [11 November 2020 16:48 UTC](https://discourse.joplinapp.org/t/questions-and-findings-on-plugin-api/12384 "2020-11-11T16:48:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benji300](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/benji300/32/5645_2.png) [@benji300](https://discourse.joplinapp.org/u/benji300)\
**Post date:** [11 November 2020 16:48 UTC](https://discourse.joplinapp.org/t/questions-and-findings-on-plugin-api/12384/1 "2020-11-11T16:48:00Z")

</div>

Hello @laurent,

as mentioned in this [post](https://discourse.joplinapp.org/t/pre-release-1-3-with-plugin-support-is-now-available-updated-31-10-20/11562/60) I started to implement a simple plugin.  
It simply adds some new commands and maps existing commands to the "main menu".

In this thread I would like to share some questions and findings (I guess they are findings 😉) I have noticed so far. I would be glad if you have some time to look at them.  
I will add them as extra posts below.

If you want to have a look at the plugin itself, here's the current version of the `index.ts`:

[index.ts](https://discourse.joplinapp.org/uploads/short-url/oLTRnNOQ3MJeXIXSRuSjsyr6C2.ts) (14.4 KB)

**Once again, many thanks for all your hard work and efforts!!!**

---

<div class="post-metadata">

**Author:** ![benji300](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/benji300/32/5645_2.png) [@benji300](https://discourse.joplinapp.org/u/benji300)\
**Post date:** [11 November 2020 16:49 UTC](https://discourse.joplinapp.org/t/questions-and-findings-on-plugin-api/12384/2 "2020-11-11T16:49:55Z")

</div>

First a few general questions.  
Please consider that I am a newby in the Node.js/Electron/Typescript environment...

1. Is there a command to open the note history view?

2. Is it possible to specify the minimum version of Joplin for a plugin?

3. Is it possible to create separators in menus?

4. Is it possible to specify own `enabledCondition` queries?

---

<div class="post-metadata">

**Author:** ![benji300](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/benji300/32/5645_2.png) [@benji300](https://discourse.joplinapp.org/u/benji300)\
**Post date:** [11 November 2020 16:58 UTC](https://discourse.joplinapp.org/t/questions-and-findings-on-plugin-api/12384/3 "2020-11-11T16:58:21Z")

</div>

And here a few Findings:

1. Internal shortcuts have higher priority then default accelarators from plugin

2. Disabling commands with `enabledCondition` has no effect in note context menu

3. Sub-menu entries are not shown in keyboard editor unless they have a default accelarator (or manually added shortcuts in `keymap-desktop.json` )

4. Plugin icons in toolbars (e.g. note toolbar) seem to be bigger than the default ones

5. Context menu cannot have sub-menus

All these findings can be tested with the attached plugin from the first post.  
Search for "API" in `index.ts` for the relevant code lines of the above mentioned findings.
