Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying multiple cells breaks the table #5

Open
Alwinius opened this issue Jul 9, 2014 · 10 comments
Open

Copying multiple cells breaks the table #5

Alwinius opened this issue Jul 9, 2014 · 10 comments
Labels

Comments

@Alwinius
Copy link
Contributor

Alwinius commented Jul 9, 2014

When I try to copy selected cells from one table to another the line brokes and the {"payload":[["-thing appears.
I use still Firefox 30.

@quenenni
Copy link
Collaborator

When I tried that, it worked all the times.
The only thing that happened is all the styles / colors / linebreaks were removed.
But I never had a broken cell.

Even when I tried to copy 3 cells from a row, I didn't have any broken cell / row / table. The strange effect was that the data from the 3 cells were all in the cell where I pasted the data.

@Alwinius
Copy link
Contributor Author

You're right. When the text cursor is in a cell, I can paste data, and when one cell is selected, too. But when I select more than one cell, so for example I copied data from two cells and want to paste it now to two other cells, I get the payload thing.

@quenenni
Copy link
Collaborator

Ok, I found the way to have the payload problem..
You start the selection outside the table.

Unfortunately, we are in the same situation as for the 'copy table' issue.
I'm unable to manage the onPaste hook and by doing this, you break the table structure (the hidden data).

@JohnMcLear Maybe you have an idea how I can manage this?

@JohnMcLear
Copy link

You probably need to use aceEditEvent and if it's you that made the edit re-fix the table to it's original state or to something sane..

Either way a line clean up that allows a table to be in an incomplete state should never be allowed anyway so if you focus on ensuring table integrity you will be onto a winner.

@quenenni
Copy link
Collaborator

Thanks for your quick help.
I'm going to test that.

@quenenni quenenni mentioned this issue Nov 6, 2014
@quenenni
Copy link
Collaborator

quenenni commented Nov 7, 2014

I tested the aceEditEvent and indeed it's possible to copy / paste the data and structure of the table as I have the start and ending of the selection values.

But I'm not happy with that.
There are plenty of different ways to use copy/paste:

  • Copy / paste the content of a cell
  • Copy / paste the content + style of a cell
  • Same on severall cells
  • Same with rows
  • Copy / paste a table (always structure & data in this case)

By using AceEditEvent, it will be very difficult to know in what situation I'm in.
There is no way to say you want to paste this or that.

So I was wondering if adding a Copy / paste menu could be a better way to manage that.

Table Menu (submenu)
Copy / paste -> Copy cell content
-> Copy cell content + style
-> Copy row content
-> Copy row xontent + style
-> Copy table
-> Paste

That way, you put the cursor in the cell / row you want to copy, you click that menu you need, you put the cursor where you want to paste and click 'Paste' in the menu.

But to do that, I need to keep in memory what the user asked.

What's the best / good way to do that?
Is there an equivalent in Etherpad / NodeJs as the php session, somewhere I can put data and use it later?

@skupfer
Copy link

skupfer commented Apr 21, 2015

Any news on that? Would love to see a way to copy a table...
Etherpad is trying to do it because I am able to see the copied table for about half a second before it is going to remove the structure

@quenenni
Copy link
Collaborator

Hello,

I'm sorry to say that I'm won't do it.
In fact, I'm out of etherpad project as I unfortunately don't have time for it anymore.

If you are interested to do it, feel free to fork it.

Again, sorry for that.

@seballot seballot changed the title Copying cells Copying multiple cells breaks the table Sep 27, 2018
@seballot
Copy link
Owner

#13

@seballot seballot added the bug label Sep 27, 2018
@eyea
Copy link

eyea commented Jan 22, 2022

emmm.... 50000 years later :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants