Comments (4)
Have you looked at this library? https://github.com/zenorocha/clipboard.js
This is what codecopy uses "under the hood".
from codecopy.
@Glennmen Yes, I am familiar with that... and that project helped get the built-in support for copy to clipboard. What I'm looking for is the "automatically for any code block" feature... which, funny enough, that library references this project for.
I guess I'm looking for best of both worlds, built into my apps that do not require the end-user to install anything (primarily for users who are unable to install anything due to restrictions noted in the op). I'm perfectly OK forking my own internal project to solve this, just feels like it makes sense that one of these two projects would support it as it is in the same wheel house and I think a valid use-case.
Really appreciate the feedback and consideration. Should I move this request to clipboard.js?
from codecopy.
So you are looking for exactly this project but compiled into a library.
from codecopy.
@Glennmen yes, that's correct. This request might fit better in clipboard.js, but since that project links to this project I landed here. Happy to move it to clipboard.js and/or provide any other details that might help.
Some additional context: Often the HTML is automatically generated (for example, from Markdown) so having a library that operates on any <pre>
or <code>
(like codecopy does) fits well since adding id's/classes might not be possible (easily) for many use cases even if plugging into an app I own.
from codecopy.
Related Issues (20)
- use with TiddlyWiki HOT 2
- GitHub Editor Glitch HOT 1
- Does `copycode` also work with Gist snippets? HOT 8
- GitHub Enterprise? HOT 5
- Overflowing the text from Github Repo Card ? HOT 6
- [Bug] Extension breaks up Medium.com code blocks
- Feature Request for Search Engine Samples HOT 2
- show the copy icon always
- Copy button gets outside on Stack Exchange sites
- can not add custom domain
- [BUG] Stopped working on Github.com HOT 11
- [BUG] "Enable CodeCopy on this domain" not available HOT 2
- Different spacing above and below code blocks
- Remove GitHub since it has native support HOT 3
- Add github.io
- Update the firefox extension
- Why has CodeCopy been removed from Chrome Web Store? HOT 7
- Tested this successfully on Edge Browser
- Chrome Extension link - 404 Not Found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codecopy.