mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
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.
This commit is contained in:
parent
de926c5456
commit
619bea1b99
3 changed files with 21 additions and 6 deletions
|
|
@ -8254,7 +8254,7 @@
|
|||
<script defer src="modules/ui/rivers-editor.js?v=1.106.0"></script>
|
||||
<script defer src="modules/ui/rivers-creator.js?v=1.106.0"></script>
|
||||
<script defer src="modules/ui/relief-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/burg-editor.js?v=1.106.6"></script>
|
||||
<script defer src="modules/ui/burg-editor.js?v=1.108.13"></script>
|
||||
<script defer src="modules/ui/units-editor.js?v=1.108.12"></script>
|
||||
<script defer src="modules/ui/notes-editor.js?v=1.107.3"></script>
|
||||
<script defer src="modules/ui/ai-generator.js?v=1.108.8"></script>
|
||||
|
|
@ -8269,7 +8269,7 @@
|
|||
<script defer src="modules/ui/regiment-editor.js?v=1.108.5"></script>
|
||||
<script defer src="modules/ui/battle-screen.js?v=1.108.5"></script>
|
||||
<script defer src="modules/ui/emblems-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/markers-editor.js?v=1.108.5"></script>
|
||||
<script defer src="modules/ui/markers-editor.js?v=1.108.13"></script>
|
||||
<script defer src="modules/ui/3d.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/submap-tool.js?v=1.106.2"></script>
|
||||
<script defer src="modules/ui/transform-tool.js?v=1.106.2"></script>
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue