From bd048f7aa7174c1db688079eb8016f64e87bfcf0 Mon Sep 17 00:00:00 2001 From: Alex <24763887+QWxleA@users.noreply.github.com> Date: Wed, 13 Apr 2022 21:45:13 +0200 Subject: [PATCH] now with configurable keybindings --- index.ts | 62 +++++++++++++++++++++++++++++++++++++++++----------- package.json | 2 +- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/index.ts b/index.ts index d74d0f5..96ca917 100644 --- a/index.ts +++ b/index.ts @@ -2,6 +2,7 @@ import '@logseq/libs'; import SettingSchemaDesc from '@logseq/libs/dist/LSPlugin.user'; // import axios from "axios"; +const pluginName = ["logseq-interstitial", "Logseq Interstitial"] const markupChoices = ["markdown", "orgmode"] const markupHeadMrk = ["#", "*"] const markupTimeMrk = ["**", "*"] @@ -11,13 +12,15 @@ const settingsTemplate:SettingSchemaDesc[] = [{ default: false, title: "Insert Header by default?", description: "If true, \" t\" will insert a header, otherwise only the (bold) timestamp.", - },{ + }, + { key: "boldText", type: 'boolean', default: true, title: "Create a bold timestamp? (If not a header)", description: "Insert a bold timestamp. Not for header or custom text.", - },{ + }, + { key: "markup", type: 'enum', enumChoices: markupChoices, @@ -25,28 +28,43 @@ const settingsTemplate:SettingSchemaDesc[] = [{ default: markupChoices[0], title: "What markup language to use?", description: "Markdown or Org-mode.", - },{ + }, + { key: "level", type: 'number', default: 3, title: "Title level?", description: "Insert timestamped heading level, default to 3 (### HH:MM title)", - },{ + }, + { key: "cstTime", type: 'string', default: "", title: "Custom time stamp?", description: "Leave empty for default, \n Use '