{"id":29012955,"url":"https://github.com/superstructor/re-frame-clipboard-fx","last_synced_at":"2025-08-18T01:34:07.624Z","repository":{"id":62434811,"uuid":"274793518","full_name":"superstructor/re-frame-clipboard-fx","owner":"superstructor","description":"Clipboard Effect Handler for re-frame","archived":false,"fork":false,"pushed_at":"2021-07-31T01:18:00.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T22:38:10.140Z","etag":null,"topics":["re-frame","re-frame-effects"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superstructor.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"superstructor"}},"created_at":"2020-06-25T00:00:37.000Z","updated_at":"2021-07-31T01:18:02.000Z","dependencies_parsed_at":"2022-11-01T21:02:27.985Z","dependency_job_id":null,"html_url":"https://github.com/superstructor/re-frame-clipboard-fx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/superstructor/re-frame-clipboard-fx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstructor%2Fre-frame-clipboard-fx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstructor%2Fre-frame-clipboard-fx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstructor%2Fre-frame-clipboard-fx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstructor%2Fre-frame-clipboard-fx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superstructor","download_url":"https://codeload.github.com/superstructor/re-frame-clipboard-fx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstructor%2Fre-frame-clipboard-fx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270932571,"owners_count":24670240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["re-frame","re-frame-effects"],"created_at":"2025-06-25T19:05:16.531Z","updated_at":"2025-08-18T01:34:07.584Z","avatar_url":"https://github.com/superstructor.png","language":"Clojure","funding_links":["https://github.com/sponsors/superstructor"],"categories":[],"sub_categories":[],"readme":":source-highlighter: coderay\n:source-language: clojure\n:toc:\n:toc-placement: preamble\n:sectlinks:\n:sectanchors:\n:toc:\n:icons: font\n\nimage:https://img.shields.io/clojars/v/superstructor/re-frame-clipboard-fx?style=for-the-badge\u0026logo=clojure\u0026logoColor=fff[\"Clojars Project\", link=\"https://clojars.org/superstructor/re-frame-clipboard-fx\"]\nimage:https://img.shields.io/github/issues-raw/superstructor/re-frame-clipboard-fx?style=for-the-badge\u0026logo=github[\"GitHub issues\", link=\"https://github.com/superstructor/re-frame-clipboard-fx/issues\"]\nimage:https://img.shields.io/github/license/superstructor/re-frame-clipboard-fx?style=for-the-badge[\"License\", link=\"https://github.com/superstructor/re-frame-clipboard-fx/blob/master/LICENSE\"]\n\n== Clipboard Effect Handler for re-frame\n\nThis re-frame library contains an\nhttps://github.com/superstructor/re-frame/blob/develop/docs/Effects.md[Effect Handler]\nfor interacting with the system clipboard.\n\nKeyed `::re-frame.clipboard-fx/copy`, it wraps browsers' native\nlink:https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard[`Document.execCommand()` API].\n\nCurrently only the `copy` operation is supported. Future work includes supporting the\nlink:https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API[Clipboard API]\nand support for more operations.\n\n== Quick Start\n\n=== Step 1. Add Dependency\n\nAdd the following project dependency:\nimage:https://img.shields.io/clojars/v/superstructor/re-frame-clipboard-fx?style=for-the-badge\u0026logo=clojure\u0026logoColor=fff[\"Clojars Project\", link=\"https://clojars.org/superstructor/re-frame-clipboard-fx\"]\n\nRequires re-frame \u003e= 0.8.0.\n\n=== Step 2. Registration and Use\n\nIn the namespace where you register your event handlers, prehaps called\n`events.cljs`, you have two things to do.\n\n*First*, add this require to the `ns`:\n\n```\n(ns app.events\n  (:require\n   ...\n   [re-frame.clipboard-fx :as clipboard-fx]\n   ...))\n```\n\n*Second*, write an event handler which uses this effect:\n\n```\n(reg-event-fx\n  :handler-with-clipboard\n  (fn [{:keys [db]} _]\n    {::clipboard-fx/copy {:text       (get-in db [:some :path :to :text])\n                          :on-success [:clipboard-success]\n                          :on-failure [:clipboard-failure]}}))\n```\n\n== License\n\nCopyright \u0026copy; 2020-2021 Isaac Johnston.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstructor%2Fre-frame-clipboard-fx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperstructor%2Fre-frame-clipboard-fx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstructor%2Fre-frame-clipboard-fx/lists"}