From 1fb4228634059a537014d53c35db78f0ccc895cf Mon Sep 17 00:00:00 2001 From: Franco Speziali Date: Thu, 17 Mar 2022 15:54:24 +0100 Subject: [PATCH] Updated plugin integration with Joplin --- plugin.config.json | 2 +- src/index.ts | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plugin.config.json b/plugin.config.json index c2efd61..bce1cf1 100644 --- a/plugin.config.json +++ b/plugin.config.json @@ -1,3 +1,3 @@ { - "extraScripts": [] + "extraScripts": ["joplin-plugin-event-calendar.ts"] } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index e27a5d1..fc83f0d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,12 @@ -import joplin from 'api'; +import joplin from "api"; +import { ContentScriptType } from "api/types"; joplin.plugins.register({ - onStart: async function() { - console.info('Hello world. Test plugin started!'); + onStart: async function () { + await joplin.contentScripts.register( + ContentScriptType.MarkdownItPlugin, + "joplin-plugin-event-calendar", + "./joplin-plugin-event-calendar.js" + ); }, });