Teammates: Instructor: enroll students: add a 'paste' option to the context menu

Created on 19 Jul 2018  Â·  11Comments  Â·  Source: TEAMMATES/teammates

v6.7.0

current: in the spreadsheet interface of the enroll page, user can use Ctrl+V to paste data.

problem: a user reported looking for the Paste option for a long time in the context menu before realizing he can use Ctrl+V

suggestion: add a Paste (Ctrl + V) to the context menu of the spreadsheet UI

image

a-UIX help wanted p.Medium

Most helpful comment

Good point @LiHaoTan We can create an issue to add Paste support for Chrome, perhaps a low priority issue for new contributors to do. For the moment we can merge the simpler solution as @tanhengyeow has more urgent things to do in the next couple of weeks.

All 11 comments

@tanhengyeow is this doable?

@damithc I looked at the Handsontable API briefly and it seems possible. I'll work on it first and note down any incompatibilities or issues faced.

@damithc I did a research on including a paste option and here are some findings.

This is an extract from the Handsontable website regarding the paste option in context menus:

Right-clicking in Handsontable to paste data is limited by browsers, for security reasons. Without these measures, different sites could use scripts to steal the data from users’ clipboards. Some companies, like Google, allow you to paste data between their applications, but it is a workaround, not a solution.

The recommended solution to copy paste in between applications as follows:

If you want to copy data from another page, web application (like Google Sheets) or MS Excel, use a keyboard shortcut instead.

Moreover, how Handsontable is currently handling copying and pasting of data through keyboard shortcuts is through a library named SheetClip. The library does not provide clipboard access through JavaScript (possibly due to security reasons mentioned above) and it mentioned how Handsontable is utilizing it:

This library was created with the intention to be used in Handsontable.

It does not provide you with clipboard access in JavaScript. That part still needs to be figured out by you. There are various ways to achieve it but none of them is perfect. Probably the most compatible with all the browsers is to keep a hidden