Skip to content
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

Any plans to support copy to clipboard (markdown code) for notes? #195

Closed
ItsNoted opened this issue Jun 5, 2024 · 10 comments
Closed

Any plans to support copy to clipboard (markdown code) for notes? #195

ItsNoted opened this issue Jun 5, 2024 · 10 comments

Comments

@ItsNoted
Copy link

ItsNoted commented Jun 5, 2024

Love this but I’m curious if there will ever be an option to past code into notes we can easily copy to clipboard. I like to save snippets and compose stacks.

@kamtschatka
Copy link
Contributor

are you talking about the whole note, or about separate code blocks you have added using markdown? (with 3 `)
I like both ideas actually.

@ItsNoted
Copy link
Author

ItsNoted commented Jun 5, 2024

Just the code blocks with copy to clipboard. 😊

@kamtschatka
Copy link
Contributor

I managed to do this:
image
image

When you copy it, you get a short indicator:
image

The black border around the syntax highlighter is not perfect, but tbh, i have no idea how to get rid of it^^.
Maybe @MohamedBassem or someone else knows.

I will create a PR so people can have a look.

kamtschatka added a commit to kamtschatka/hoarder-app that referenced this issue Jun 5, 2024
…rder-app#195

added a button to copy the markdown and added code highlighting
@ItsNoted
Copy link
Author

ItsNoted commented Jun 6, 2024

Looking good!

@ItsNoted
Copy link
Author

ItsNoted commented Jun 6, 2024

What version can I grab to try it out for docker or do I need to build it myself?

@kamtschatka
Copy link
Contributor

I have only opened the PullRequest so far. Right now you would need to pull from that branch and build it yourself to try it out.
To have it in the docker image, the PR needs to be merged and a new version needs to be released.

@ItsNoted
Copy link
Author

ItsNoted commented Jun 6, 2024

This really could replace the amazing project Snippet-Box which has been abandoned for quite some time now. https://github.com/pawelmalak/snippet-box. Take a look at that project and you can see how Hoarder has some similar attributes. This is why I love this project so much because it reminds me a lot of Snippet-Box. I'm excited to see where it goes :)

kamtschatka added a commit to kamtschatka/hoarder-app that referenced this issue Jun 8, 2024
…rder-app#195

Changed the copy-button to a generic one
added a safeguard and a message to the copy button if copying is not possible
@ItsNoted
Copy link
Author

Thanks for adding this! It didn't work locally but when I tried it on my cloudflare tunnel it worked. Not sure why but maybe something to do with my update process.

@MohamedBassem
Copy link
Collaborator

@ItsNoted chrome doesn't allow accessing the clipboard except when using https or localhost. So it won't work on http unfortunately.

@kamtschatka
Copy link
Contributor

there should be a tooltip though, that explains this?

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

No branches or pull requests

3 participants