Fantasy-Map-Generator/modules/io
Claude 154145a518
feat(obsidian): persist FMG-to-note association with fmg-id in frontmatter
When a user selects or creates a note for a burg/marker, the system now
automatically links them together by adding/updating the note's frontmatter.

**How it works:**

1. **When saving a note**:
   - Adds `fmg-id: burg123` to frontmatter
   - Updates `x:` and `y:` coordinates
   - Preserves existing frontmatter fields

2. **When creating a new note**:
   - Template includes fmg-id from the start
   - Uses the proper elementId (e.g., "burg123")

3. **Next time you edit**:
   - System finds note instantly by fmg-id
   - No need to search by coordinates again
   - Permanent two-way link established

**Changes:**
- obsidian-notes-editor.js:
  - Pass elementId and coordinates to showMarkdownEditor()
  - updateFrontmatterWithFmgData() injects fmg-id on save
  - Automatically updates coordinates to keep in sync
- obsidian-bridge.js:
  - generateNoteTemplate() accepts elementId parameter
  - Uses elementId for fmg-id instead of element.id

Users no longer need to manually match notes - once linked, the
association is permanent in the note's frontmatter.
2025-11-14 04:22:24 +00:00
..
cloud.js chore: parse DEBUG setting as an object 2024-10-22 14:45:25 +02:00
export.js fix(v1.108.11): add external icons to export in base64 format 2025-07-18 02:31:10 +02:00
load.js fix(v1.108.13): add comprehensive race condition guards in load.js 2025-11-14 03:30:12 +00:00
obsidian-bridge.js feat(obsidian): persist FMG-to-note association with fmg-id in frontmatter 2025-11-14 04:22:24 +00:00
save.js chore: remove debug logging from default map feature 2025-11-14 03:55:45 +00:00