Anchor Plugin Test - Multi-Instance Support
Testing anchor plugin with multiple editor instances
Test Instructions:
- Add Anchor: Place cursor in editor, click anchor button (⚓) in toolbar
- ID Validation: Try entering special characters - should auto-sanitize to URL-safe format
- Uniqueness: Try creating duplicate anchor IDs - should show error
- Visual Indicator: Hover over created anchors to see ⚓ icon and ID tooltip
- Multi-Instance: Create anchors in both editors - IDs should be independent per editor
- Keyboard: Press
ESCto cancel,Enterto save in dialog
Editor Instance 1
Editor 1: Navigation Targets
Try adding anchors with IDs like: section-1, intro, conclusion
Hover over created anchors to see the visual indicator!
Editor Instance 2 (Independent)
Editor 2: Independent Anchors
You can create anchors with the same IDs as Editor 1 - they are independent!
Each editor maintains its own anchor registry.
✅ Features to Verify:
- ✓ Anchor button appears in toolbar with ⚓ icon
- ✓ Dialog opens when clicking anchor button
- ✓ ID validation (URL-safe characters only)
- ✓ Auto-sanitization (e.g., "My Section!" → "my-section")
- ✓ Duplicate ID detection with error message
- ✓ Visual hover indicator showing ⚓ + ID
- ✓ ESC key closes dialog without saving
- ✓ Enter key saves anchor
- ✓ Multi-instance support (independent registries)
- ✓ Clean cursor positioning after insertion