Coder Social home page Coder Social logo

Comments (4)

Glennmen avatar Glennmen commented on July 4, 2024

Have you looked at this library? https://github.com/zenorocha/clipboard.js
This is what codecopy uses "under the hood".

from codecopy.

derks avatar derks commented on July 4, 2024

@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.

Glennmen avatar Glennmen commented on July 4, 2024

So you are looking for exactly this project but compiled into a library.

from codecopy.

derks avatar derks commented on July 4, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.