cheminfo / jsme

19 stars 5 forks source link

Simple way to copy / paste #17

Open lpatiny opened 7 years ago

lpatiny commented 7 years ago

It would be nice when you are hover JSME and you press

CTRL - V

(CMD + V on the macintosh)

You paste actually the clipboard directly in JSME. Currently CTRL-V on the mac just open the paste window.

Like that you could paste Molfile, SMILES, JSME format but also your SVG now that it embeds the structure. This would be the simplest way to make the round trip paste and reload the chemical structure.

Also a CRTL-C (or CMD-C on the macintosh) could copy by default the SVG with embedded molecule. This could be an option is we copy the SVG, molfile, SMILES or JSME.

@stropitek @targos

brunob54 commented 7 years ago

Yes, the clipboard handling could be improved.

The SVG with an embedded V3000 molecule is an idea about how SVG could be extended to contain meta information about the chemical structure. This is not standardized. The copy/paste roundtrip will work only with JSME. I am open to other ideas/suggestions..

lpatiny commented 7 years ago

Even if not standardise it would be of great help and we would really like to be able to make simple CTRL-C and CTRL-V when we are hover JSME

The possibility to use a method to select what will go toward the clipboard would really be a plus and indeed there are 5 possibilities. SMILES, molfile v2, molfile v3, JME or SVG with embedded v3000.

We are really eager to test such a version !

targos commented 7 years ago

Kind of related: I think a big plus would be to be able to drop a molecule from ChemDraw in JSME.

lpatiny commented 7 years ago

@targos did you inspect the content of the information that the browser receive ? Is it easy todo ?

targos commented 7 years ago

I'm unable to get a drop event in the browser from ChemDraw...

brunob54 commented 7 years ago

Even if not standardise it would be of great help and we would really like to be able to make simple CTRL-C and CTRL-V when we are hover JSME

Implemented in JSME-2017-03-21

The possibility to use a method to select what will go toward the clipboard would really be a plus and indeed there are 5 possibilities. SMILES, molfile v2, molfile v3, JME or SVG with embedded v3000.

Not done yet