mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 23:47:12 +02:00
Fix nostr entity matching in paste handler (#197)
* fix: only match nostr entities at word boundaries in paste handler Updates the paste handler regex to only match nostr bech32 entities (npub, note, nevent, naddr, nprofile) when surrounded by whitespace or at string boundaries. This prevents URLs containing nostr entities (e.g., https://njump.me/npub1...) from being incorrectly converted to mentions. Uses a capture group (^|\s) instead of lookbehind assertion for Safari compatibility (lookbehind only supported in Safari 16.4+). * fix: disable pointer events on links in editor Adds pointer-events: none to anchor tags within the ProseMirror editor to prevent clicking on pasted URLs from navigating away. This allows users to edit the text containing links rather than accidentally triggering navigation. --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -392,6 +392,11 @@ body.animating-layout
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* Disable link navigation in editor - allow editing instead of clicking */
|
||||
.ProseMirror a {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Mention styles */
|
||||
.ProseMirror .mention {
|
||||
color: hsl(var(--primary));
|
||||
|
||||
Reference in New Issue
Block a user