Highlights syntax within a textarea. Easily configured using HTML5 attributes and/or JavaScript API. Take it for a spin in our playground!
For a complete guide and working demo refer to the doumentation
<script src="https://cdn.CoCreateJS.com/print/latest/CoCreate-print.min.js"></script><script src="https://cdn.CoCreateJS.com/print/latest/CoCreate-print.min.css"></script>$ npm i @cocreate/print$ yarn install @cocreate/printAll updates to this library are documented in our CHANGELOG and releases. You may also subscribe to email for releases and breaking changes.
If you are interested in the future direction of this project, please take a look at our open issues and pull requests. We would love to hear your feedback.
CoCreate-print is guided and supported by the CoCreate Developer Experience Team.
Please Email the Developer Experience Team here in case of any queries.
CoCreate-print is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
We encourage contribution to our libraries (you might even score some nifty swag), please see our CONTRIBUTING guide for details.
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create issues and pull requests or merely upvote or comment on existing issues or pull requests.
We appreciate your continued support, thank you!
Use actions="print" with print-query to print selected elements. Without an
actions attribute, print-query also works as a standalone click control.
Repeated initialization does not attach duplicate click handlers.
Printing copies current input, checkbox, textarea, and select values into an
isolated iframe, loads the page styles and images, and expands scroll containers
without changing the live view. The printed event is emitted from the trigger
and bubbles after the browser's print dialog closes (afterprint); it does not
indicate that the user actually printed rather than cancelled. Action chains
continue at that point. Failures emit printError and abort the chain. The print
iframe is removed on completion or failure.
