dwmkerr / crosswords-js

Tiny, lightweight crossword control for the web.
https://dwmkerr.github.io/crosswords-js/
MIT License
71 stars 27 forks source link

Resolve issue #53 - feature request #54

Open pvspain opened 6 months ago

pvspain commented 6 months ago

Issue #53 - Copy a clue solution to the clipboard

Add public API controller method copyCurrentClueSolution(), DOM ident copy-clue-solution and published event clueSolutionCopied. An example is added to the demo as the clue Copy button.

The current clue solution is copied to the clipboard - the desired clue must be highlighted in the crossword grid. The logic for the action requires that the solver's answer be correct or the clue revealed before the solution is copied to the clipboard.