Skip to content

Avoid removing line breaks on paste #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Avoid removing line breaks on paste #32

wants to merge 1 commit into from

Conversation

staab
Copy link
Collaborator

@staab staab commented May 16, 2025

Pasting

a

b

reduces the two line breaks to two. I'm not sure if this change will have other implications, but it has to be applied by the user so they can make their own version.

@staab staab requested a review from cesardeazevedo May 16, 2025 18:07
@cesardeazevedo
Copy link
Owner

Thanks, this makes sense, but I found an issue when pasting with a nostr:nprofile

nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcprfmhxue69uhhyetvv9ujuem9w3skccne9e3k7mf0wccsqgxxvqas78x0a339m8qgkaf7fam5atmarne8dy3rzfd4l4x6w2qpncmfs8zh 
    
123
Screenshot 2025-05-17 at 15 37 28

@staab
Copy link
Collaborator Author

staab commented May 21, 2025

Ok, fixed that as well as the doubling of line breaks on copy. This also ended up fixing a bug which you can see in the video below, where pasting content back into the editor strips all the attributes. Still, for whatever reason, copying content from the editor and pasting it back in doesn't trigger paste rules, but it's better than what was happening before.

nostr-editor.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants