From 619bea1b99c47520b372bf86e1f31988b265507e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Nov 2025 03:59:19 +0000 Subject: [PATCH] feat: integrate Obsidian notes into burg and marker editors Replace the old TinyMCE notes editor with Obsidian integration in: - Burg editor "Edit note" button - Marker editor "Edit note" button Changes: - modules/ui/burg-editor.js: Update editBurgLegend() to call editObsidianNote() - modules/ui/markers-editor.js: Update editMarkerLegend() to call editObsidianNote() - Both functions fall back to old editNotes() if Obsidian is not configured - index.html: Update version hashes to 1.108.13 Now when users click "Edit note" on a burg or marker, they get the modern Markdown editor with Obsidian vault integration instead of the old WYSIWYG. --- index.html | 4 ++-- modules/ui/burg-editor.js | 14 +++++++++++--- modules/ui/markers-editor.js | 9 ++++++++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 976ee481..9a7bc578 100644 --- a/index.html +++ b/index.html @@ -8254,7 +8254,7 @@ - + @@ -8269,7 +8269,7 @@ - + diff --git a/modules/ui/burg-editor.js b/modules/ui/burg-editor.js index 13e32850..cc331342 100644 --- a/modules/ui/burg-editor.js +++ b/modules/ui/burg-editor.js @@ -486,9 +486,17 @@ function editBurg(id) { } function editBurgLegend() { - const id = elSelected.attr("data-id"); - const name = elSelected.text(); - editNotes("burg" + id, name); + const id = +elSelected.attr("data-id"); + const burg = pack.burgs[id]; + + // Use Obsidian integration if available, otherwise fall back to old notes system + if (typeof editObsidianNote !== "undefined") { + const coordinates = {x: burg.x, y: burg.y}; + editObsidianNote(id, "burg", coordinates); + } else { + const name = elSelected.text(); + editNotes("burg" + id, name); + } } function showTemperatureGraph() { diff --git a/modules/ui/markers-editor.js b/modules/ui/markers-editor.js index 9f56db9a..30bdd90b 100644 --- a/modules/ui/markers-editor.js +++ b/modules/ui/markers-editor.js @@ -221,7 +221,14 @@ function editMarker(markerI) { function editMarkerLegend() { const id = element.id; - editNotes(id, id); + + // Use Obsidian integration if available, otherwise fall back to old notes system + if (typeof editObsidianNote !== "undefined" && marker) { + const coordinates = {x: marker.x, y: marker.y}; + editObsidianNote(marker.i, "marker", coordinates); + } else { + editNotes(id, id); + } } function toggleMarkerLock() {