Hi mighty Wizards of the web,
Question:
Is it possible to copy the contents of a specifiy stylesheet to the users clipboard?
Example:
- The User clicks on a "copy to clipboard" button.
- The contents of the forms.css is copied to his clipboard.
- The User can paste those content in hier own project.
Possible Approaches:
Use a plugin: The copycss plugin seems to be coming close to what I need, but copies only the css of specified DOM elements. I would need the css-code of a whole stylesheet. Example: Everything that is related to form elements (copied from the forms.css)
Copy from the DOM: Another approach would be to insert the stylesheets content into a hidden textfield and copy it from there via jQuery. But I'm not sure if its possible to somehow grab the content and insert it into the DOM.
Any Ideas?
I'm grateful for any push in the right direction.
All the best! Cheers!