mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
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.
This commit is contained in:
parent
28cf8db82d
commit
154145a518
3 changed files with 49 additions and 10 deletions
|
|
@ -8281,8 +8281,8 @@
|
|||
<script defer src="modules/io/load.js?v=1.108.13"></script>
|
||||
<script defer src="modules/io/cloud.js?v=1.106.0"></script>
|
||||
<script defer src="modules/io/export.js?v=1.108.11"></script>
|
||||
<script defer src="modules/io/obsidian-bridge.js?v=1.108.13.2"></script>
|
||||
<script defer src="modules/ui/obsidian-notes-editor.js?v=1.108.13.2"></script>
|
||||
<script defer src="modules/io/obsidian-bridge.js?v=1.108.13.3"></script>
|
||||
<script defer src="modules/ui/obsidian-notes-editor.js?v=1.108.13.3"></script>
|
||||
<script defer src="modules/ui/obsidian-config.js?v=1.108.13"></script>
|
||||
|
||||
<script defer src="modules/renderers/draw-features.js?v=1.108.2"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue