From 23503e932dcd3aa824f396640e3f048884214a98 Mon Sep 17 00:00:00 2001 From: CIN-DEV-netizen Date: Wed, 24 Jun 2026 08:54:33 -0600 Subject: [PATCH 1/3] Add QuickCallouts QOwnNotes script Add a new QOwnNotes scripting extension 'QuickCallouts'. Includes QuickCallouts.qml which registers three custom actions (Info, Warning, Note) and inserts styled HTML callout blocks into notes, and info.json with metadata for the script. --- QuickCallouts/QuickCallouts.qml | 54 +++++++++++++++++++++++++++++++++ QuickCallouts/info.json | 10 ++++++ 2 files changed, 64 insertions(+) create mode 100644 QuickCallouts/QuickCallouts.qml create mode 100644 QuickCallouts/info.json diff --git a/QuickCallouts/QuickCallouts.qml b/QuickCallouts/QuickCallouts.qml new file mode 100644 index 0000000..3614322 --- /dev/null +++ b/QuickCallouts/QuickCallouts.qml @@ -0,0 +1,54 @@ +import QtQml 2.0 +import QOwnNotesTypes 1.0 + +Script { + /** + * Initializes the custom buttons and menu items in QOwnNotes + */ + function init() { + script.registerCustomAction("insertInfoCallout", "Insert Info Callout", "Info Callout", "dialog-information"); + script.registerCustomAction("insertWarningCallout", "Insert Warning Callout", "Warning Callout", "dialog-warning"); + script.registerCustomAction("insertNoteCallout", "Insert Note Callout", "Note Callout", "dialog-warning"); + } + + /** + * Triggers when you click the menu action or custom toolbar button + */ + function customActionInvoked(identifier) { + var selectedText = script.noteTextEditSelectedText(); + if (!selectedText) { + selectedText = "Type your note content here..."; + } + + var resultHtml = ""; + + switch (identifier) { + case "insertNoteCallout": + resultHtml = '
' + + '

📝 Note

' + + 'Items of Interest' + + '

' + selectedText + '

' + + '
'; + break; + + case "insertInfoCallout": + resultHtml = '
' + + '

💡 Tip

' + + '

' + selectedText + '

' + + '
'; + break; + + case "insertWarningCallout": + resultHtml = '
' + + '

⚠️ Caution

' + + 'Potential Pitfalls' + + '

' + selectedText + '

' + + '
'; + break; + } + + if (resultHtml !== "") { + script.noteTextEditWrite(resultHtml); + } + } +} diff --git a/QuickCallouts/info.json b/QuickCallouts/info.json new file mode 100644 index 0000000..c6c9d85 --- /dev/null +++ b/QuickCallouts/info.json @@ -0,0 +1,10 @@ +{ + "name": "QuickCallouts", + "identifier": "quickcallouts", + "script": "QuickCallouts.qml", + "authors": ["@CIN-DEV-netizen"], + "platforms": ["linux", "macos", "windows"], + "version": "0.0.1", + "minAppVersion": "26.06.7", + "description": "QuickCallouts is a plugin for the QOwnNotes markdown editor designed to streamline the insertion of callout blocks. Instead of manually typing complex syntax, users can instantly add Note, Info, and Warning blocks directly from the script menu. This tool helps organize and highlight critical information, tips, and alerts within your notes with a single click, making your documentation clearer and more structured.", +} \ No newline at end of file From 501bd1f57838ba834732e0e66f5bddf7d3217730 Mon Sep 17 00:00:00 2001 From: CIN-DEV-netizen Date: Mon, 29 Jun 2026 14:30:00 -0600 Subject: [PATCH 2/3] Rename QuickCallouts.qml to quick-callouts.qml to comply with kebab case requirements --- QuickCallouts/{QuickCallouts.qml => quick-callouts.qml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename QuickCallouts/{QuickCallouts.qml => quick-callouts.qml} (100%) diff --git a/QuickCallouts/QuickCallouts.qml b/QuickCallouts/quick-callouts.qml similarity index 100% rename from QuickCallouts/QuickCallouts.qml rename to QuickCallouts/quick-callouts.qml From 080c65d3506379e86620aba698404fcba82c7ae2 Mon Sep 17 00:00:00 2001 From: CIN-DEV-netizen Date: Mon, 29 Jun 2026 14:32:52 -0600 Subject: [PATCH 3/3] changed references to the name to kebabcase --- QuickCallouts/info.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/QuickCallouts/info.json b/QuickCallouts/info.json index c6c9d85..69623ad 100644 --- a/QuickCallouts/info.json +++ b/QuickCallouts/info.json @@ -1,10 +1,10 @@ { - "name": "QuickCallouts", + "name": "quick-callouts", "identifier": "quickcallouts", - "script": "QuickCallouts.qml", + "script": "quick-callouts.qml", "authors": ["@CIN-DEV-netizen"], "platforms": ["linux", "macos", "windows"], "version": "0.0.1", "minAppVersion": "26.06.7", "description": "QuickCallouts is a plugin for the QOwnNotes markdown editor designed to streamline the insertion of callout blocks. Instead of manually typing complex syntax, users can instantly add Note, Info, and Warning blocks directly from the script menu. This tool helps organize and highlight critical information, tips, and alerts within your notes with a single click, making your documentation clearer and more structured.", -} \ No newline at end of file +}