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
Copy to clipboard for codeblocks #275
Conversation
ideally we should be using fontawesome icons, like https://fontawesome.com/search?q=copy&s=brands%2Cregular |
Apparently we already have FontAwesome in there, so it's just a matter of getting ` |
I can't get this to spin up locally... very frustrating. @oraNod - I looked at the code and I think you just need to add a little to the javascript/copy.js file. You're missing the css class to call the icon you want. Then remove the html "copy" text if you don't want both. |
@insectengine Awesome. Thank you!! |
@insectengine Sorry to hear about the frustration. Was the site not building locally with Jekyll or was it trying to insert the clipboard into a document? If the latter then we'll need to do that in a separate PR to reference the js and css in the HTML pages for the docs. With this PR you need to manually add to
I'm also evaluating how we can use assets/main.css in the docs. I'd like to switch to that instead of having separate stylesheets but think that's an area where more work is required. |
@tristantarrant and @karesti We still need to modify the css files for html titles in core but this PR is ready. I'll hook it into the docs separately. I also want to remove |
@oraNod this is good for me, we can go ahead and merge |
@karesti Yes, please! |
Adds copy to clipboard hover for codeblocks.
After merge, need to update title html to link to js and css assets: