geolexica / isotc211.geolexica.org

ISO/TC 211 online version of the Multi-Lingual Glossary of Terms
https://isotc211.geolexica.org
4 stars 2 forks source link

addition of "copy to clipboad" button for English entry content #164

Closed ReesePlews closed 2 years ago

ReesePlews commented 2 years ago

If possible, I would like to add a "copy to clipboard" button that will copy the actual content of the English entry, as clear text, into the clipboard, which can then be pasted into the user's desired editing software. I am presently only considering how this could be used in MS-Word, thus clear text is probably (see Notes below) best.

The position of the "copy to clipboard" button is shown as 3) in this image. This would only be for the English entry.

geolexica_english_entry_display_revision_request_20211103_r02

Note 1: Some entries have math symbols. I do not believe they need to be copied as math symbols into the clear text. Perhaps areas where math symbols are present could be changed to "<>" in the clear text and would then be pasted out the same way. The user would need to change according to their editing software and out of scope of this enhancement request.

Note 2: It will be necessary to place (i think) a carriage return at the end of each entry component. There should not be any "formatting" inserted into the clear text except these carriage returns. It is understood the user would have to "clean up and style the entry" when they get it in their software.

Time frame: This request is not urgent. Thank you.

strogonoff commented 2 years ago

Copy button now implemented, but current behavior is to copy math as follows, with https://isotc211.geolexica.org/concepts/2236/ as an example clipboard will have following contents:

greatest lower bound largest element smaller than or equal to all elements of a set contained in an ordered domain \<\<math>> Note to entry: `[AA a in A => min(A) <= a] => [AA b in [(b in [AA a in A => b <=a] => [min(A) >= b]]` Any number is a lower bound of `O/` considered as a set of numbers, because any given number is less than any number in `O/` (an admitted vacuous statement since there is no number in `O/`, but true nonetheless). This means that the `min(O/)` must be greater than any number; this `+oo`.

SOURCE: ISO 19107:2019, (E), 3.63

ronaldtse commented 2 years ago

@strogonoff that's great! I am on Safari though I can't seem to be able to copy/paste. After clicking on the Copy icon, my clipboard still seems empty...

strogonoff commented 2 years ago

I actually only tested this in latest Safari and got successful results, could you link to the concept in question?

On 3 Dec 2021, at 3:21 PM, Ronald Tse @.***> wrote:

 @strogonoff that's great! I am on Safari though I can't seem to be able to copy/paste. After clicking on the Copy icon, my clipboard still seems empty...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ronaldtse commented 2 years ago

I tried the link you posted. Not sure why it didn't work, I did clear cache... But I tried again and it works! Thanks!

ReesePlews commented 2 years ago

Anton, thank you for adding this functionality. i tried it in FFox but it does not paste the text. the copy buffer appears to be full but nothing is pasted to another window/app. there is no problem using MS-Edge.