Releases: uthvah/sync-embeds
Sync Embeds v2.0.3
What's Changed
- fix: replace unsupported around() property descriptor with Object.defineProperty by @112345brian in #42
New Contributors
- @112345brian made their first contribution in #42
Full Changelog: 2.0.2...2.0.3
Sync Embeds v2.0.2
Sync Embeds v2.0.1: Critical Fix
Fixes the destructive behavior where notes were overwritten if an embed pointed to a non-existent header.
Huge thanks to @parkeraddison!
Sync Embeds V2.0.0 🎉
We're excited to announce Sync Embeds v2.0.0, a complete architectural overhaul with powerful new features, improved performance, and rock-solid stability!
🚀 Major New Features
🎯 Dynamic Patterns
Create embeds that automatically adapt to the current date, time, or note context:
![[Daily/{{date:YYYY-MM-DD}}|Today's Note]]
![[Tasks#{{date-7d:YYYY-MM-DD}}|Last Week's Tasks]]
![[Projects/{{title}}#Notes|Project Notes]]Supported Patterns:
{{date:FORMAT}}- Current date in any format{{date±Xu:FORMAT}}- Date offsets (d/w/m/y){{time:FORMAT}}- Current time{{title}}- Current note's title
📐 Section Viewport System
Section embeds now use an intelligent viewport system that:
- Restricts editing to only the target section
- Protects section headers from accidental modification
- Enforces header hierarchy (no H1-H2 in H3 sections)
- Blocks
#typing at line start to prevent hierarchy violations - Handles pasted content by auto-adjusting invalid headers
🎨 Per-Embed Customization
Override global settings for individual embeds using inline options:
![[Note|Custom Title{height:400px,maxHeight:600px,title:false}]]Available Options:
height- Custom height (px, vh, em, etc.)maxHeight- Maximum height before scrollingtitle- Show/hide title (true/false)
⌨️ Smart Header Commands
New Alt+2 through Alt+6 hotkeys for headers:
- Press once to convert text to header
- Press again to remove formatting
- Press different level to change header
- Automatically enforces hierarchy in section embeds
- Customizable in Obsidian's Hotkey settings
🎭 Custom Display Names (Aliases)
Show friendly names instead of raw note/section titles:
![[2024-03-15|Today's Note]]
![[Very Long Project Name#Section|Quick Reference]]Works perfectly with dynamic patterns for clean, readable dashboards.
🏗️ Architecture Improvements
Robust Command Interception
- Migrated from manual override to monkey-around library
- Proper cleanup and uninstallation tracking
- Better compatibility with other plugins
- More stable across Obsidian updates
Modular Code Structure
Complete refactor into specialized modules:
- EmbedManager - Embed lifecycle management
- CommandInterceptor - Keyboard shortcut handling
- ViewportController - Section viewport logic
- DynamicPaths - Pattern resolution and caching
- SyncEmbedsSettingTab - Comprehensive settings UI
Memory Management
- WeakMap for embed registry (prevents memory leaks)
- Proper component cleanup and leaf detachment
- Active embed tracking with automatic removal
- Cache cleanup for dynamic patterns
⚡ Performance Enhancements
Lazy Loading System
- IntersectionObserver-based progressive loading
- Configurable threshold (0px to 500px)
- Estimated heights to prevent scrollbar jumps
- Smooth scrolling with minimal jank
Smart Caching
- 1-second TTL cache for dynamic patterns
- Automatic cleanup of stale entries
- Efficient pattern resolution
- Debug logging for cache hits/misses
Optimized Rendering
- CSS-based viewport restriction (no DOM manipulation)
- Reduced layout thrashing
- Efficient event handlers
- Minimal reflows and repaints
🎨 Enhanced User Experience
Comprehensive Settings
- Appearance - Height, max height, gap presets + custom values
- Behavior - Properties collapse, inline title, focus highlight
- Header Management - Configurable hints and enforcement
- Performance - Lazy loading threshold options
- Advanced - Command interception toggle, debug mode
Visual Polish
- Focus highlighting with outline
- Loading states with animated placeholders
- Error states with helpful messages
- Theme compatibility improvements
- Responsive design for mobile
In-App Documentation
Built-in help section with:
- Complete syntax reference
- Dynamic pattern examples
- Header management guide
- Tips and best practices
- Common use cases
🐛 Bug Fixes
Critical Fixes
- ✅ Fixed stale closure bug in header input interception
- ✅ Resolved viewport CSS update race condition
- ✅ Corrected cursor position preservation in sections
- ✅ Fixed focus tracking across multiple embeds
- ✅ Prevented recursive embed crashes
Stability Improvements
- Better error handling for missing files
- Graceful degradation when patterns fail
- Proper cleanup on plugin unload
- Memory leak prevention
- Edge case handling for empty sections
📋 Complete Changelog
Added
- Dynamic date/time/title patterns with offset support
- Section viewport system with header hierarchy enforcement
- Per-embed custom options (
{height:400px,title:false}) - Header commands (Alt+2-6) with smart toggle behavior
- Alias display for custom embed titles
- Lazy loading with IntersectionObserver
- Pattern caching system
- Comprehensive settings UI with presets
- Focus highlighting toggle
- Properties collapse feature
- Debug mode with detailed logging
- In-plugin help documentation
Changed
- Complete architectural rewrite
- Command interception now uses monkey-around
- Memory management with WeakMap
- CSS-based section viewport (was content manipulation)
- Modular code organization
- Improved theme compatibility
- Better mobile support
Fixed
- Memory leaks in embed registry
- Command interception conflicts
- Section boundary detection
- Header protection edge cases
- Cursor position after edits
- Viewport update timing
- Focus tracking accuracy
- Recursive embed detection
Performance
- Lazy loading for large documents
- Smart caching for dynamic patterns
- Optimized CSS selectors
- Reduced DOM queries
- Efficient event handling
Thank You
A huge thank you to everyone who used v1.x and provided feedback! Your input directly shaped this release.
Special thanks to:
- Early adopters who reported bugs
- Users who requested features
- The Obsidian community for support
- Contributors who helped test
Enjoying Sync Embeds? Please star ⭐ the [GitHub repository](https://github.com/uthvah/sync-embeds)!
Sync Embeds v1.1.2
Keyboard shortcuts are here! 🥳
Sync Embeds v1.1.1
Sync Embeds Update
-
Live Two-Way Sync for Sections: Changes in the source note now appear instantly in the embed without needing a refresh.
-
Smart Sub-Header Creation: Automatically ensures any new header created in a section is a valid sub-header (e.g., ### inside a ## section).
-
Uneditable Section Header: The main header of a section embed is now locked to prevent accidental renaming or breaking the link.
Fixed: A race condition that could duplicate content in the source file when a section embed was updated has been resolved.
Fixed: The plugin prevents the addition of same or higher level headers in section which previously broke the embed.
Fixed: A note can no longer be embedded within itself, preventing errors.
Fixed: Embed links using display text (e.g., ![[Note|Alias]]) now work correctly (the alias is completely ignored).
Sync Embeds v1.1.0
- heading embed functionality (e.g. ![[Homework#Maths]])
- spacing improvements
Sync Embeds 1.0.0: Initial Release! 🎉
This is the very first public release of Sync Embeds!
This plugin was created to solve a simple problem: wanting to edit an embedded note without leaving the current file. With Sync Embeds, you can now create a live, fully interactive "window" into another note. Changes are synced instantly and automatically, just as if you were editing the original.