-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for plugin content scripts #3933
Comments
|
I'd like on this issue. |
|
Umm, I think this has been implemented already |
|
Oh, ok. Is there any issue involving plugins that I can work on. I'm asking so that I could also get to know better how plugins work in Joplin for Google Summer of Code. |
|
That's not necessary at this point, what's more important is to demonstrate your skills. |
|
But to answer your question - the best way to learn how plugins work is to build one. |
Oh, ok. Got it. What would be the best way to do that? Solving issues labeled "high"? Mostly all the issues labelled high or medium are claimed. |
Apologies for the delay, I've just tagged a bunch of issues with medium, feel free to take one. |
|
Has been implemented |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Plugins run in a different process and thus do not have direct access to the application content. IPC calls between the plugin process and the app process also doesn't allow transferring any complex data such as functions or entire modules.
For that reason it would be useful to introduce the concept of "content scripts" like in Web Extensions. A plugin would provide a script path to the plugin API, and this will then be loaded (using
require()) inside the main app.This will allow for example adding support for markdown-it or CodeMirror plugins.
The advantage of this approach is that most plugin operations are still done in their own process (with the associated benefits), but for specific cases we can get more customisations and performances using content scripts.
Specification
joplin.registerContentScript(type:string, path:string)require(). The same with CodeMirror, in the place where CodeMirror plugins are normally loaded.The text was updated successfully, but these errors were encountered: