Add-on Developing & Testing Internal Discussion Thread @ExtsTester

Test Mirror Download:

----- Build 3.6.7.4 -----

Test description.
The first add-on is supported: DeepL Translator.
The second plugin, the Auto Title plugin.
Add-on management interface.
Add-on certification mechanism.
Open shortcut key combinations for custom interfaces.

Add-on download:

DeepL Add-on
------Build 0.2 -----
deepl.mnaddon (6.3 KB)

Automatic title Add-on
------Build 0.3 -----
autotitle.mnaddon (3.3 KB)

Instructions for use.
1, the way to install the plugin is to send the mnaddon file directly to MN to open. After the Add-on is installed and the notebook is opened, a floating button is visible in the upper right position.
2, the add-on will be signed. Unsigned add-on will not be able to be installed and used. But there are switches in the settings that allow unsigned plugins to run. When opened, there will be a safety reminder. The review signature rights of the add-on are temporarily controlled by MarginNote to prevent malicious tampering, resulting in bounced ads that affect normal functionality or other security issues.

It is currently used primarily as a means of issuing custom features. Because in the past, there have been too many problems that have affected other users by providing custom features. The main purpose of the add-on at the moment is to improve our ability to customize it for our users.

Development notes.
1, mnaddon is in zip format, change the name to zip and extract the source code to be visible.
It can be debugged with Safari, both ios and mac versions. js is a dynamic language, so all supported data types can be seen during operation.

2, the only commonality between the JS running in the add-on and the JS we usually know is the basic JS class library, and of course the other DOM access is not there.
But the DeepL add-on also uses DOM access, because to get the translation window to scroll just right to that location, hide the title bar of DeepL

3, in addition to MN’s own unique API, MN’s add-ons support the three main iOS libraries, UIKit, Foundation, QuartzCore (not all of them, of course, but most of them), which actually allows you to use JS to write iOS applications. Because MN implements its own iOS-to-mac bridge, all JS-written interfaces can also run on the mac

4, MN’s own api is currently limited in its openness and will be done gradually with the iterations of the version. For now, it’s no problem to implement small functions like a tomato clock.

5, the API will be released later to 3.7 after the official release, some permission control issues still need several iterations of the internal version.

Caution.
Please open for development and debugging.

Prophecy.

2 Likes