Moving table rows

Having trouble installing Oxygen? Got a bug to report? Post it all here.
craig_sandvik
Posts: 5
Joined: Thu Dec 08, 2011 10:41 pm

Moving table rows

Post by craig_sandvik »

I've found a couple old threads on moving table rows up and down, but they look stale. Is there any progress on adding menu or toolbar actions to do this? It seems a common problem in both DITA and Docbook.

Is there a way to do this in outline view? I tried using drag-and-drop in outline view, which would be a straightforward solution. However, when you drag a row, there is no drop point available between the other row elements. You can drop on another row, and you are prompted to split that row, unwrap the moved row, or create an invalid insertion. All of those choices mess up the table.

I think we can code a Java action to move a row if the selection is inside it, but I'd rather skip the effort if a readymade solution is forthcoming.

We are using the Eclipse plug-in version of Author 13.2.0.v2012040515

thanks,
Craig Sandvik
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Moving table rows

Post by Radu »

Hi Craig,

Indeed in the Eclipse plugin you cannot drop nodes as siblings of other nodes (thing which is possible in the Oxygen standalone version).
This is a limitation of the platform and we cannot remove it.

But there is an available alternative:

Select the table row in the Outline, cut it, move the caret until it is placed between two other table rows and paste it there.

We've already made improvements to make selecting table rows an easy task.
In Oxygen 14 (in about 2 months) when you will move the mouse to the left side of the row in the Author page, a special selection arrow will appear and you will just have to click it to select the entire row.
You will also be able to select and move entire table columns using the same approach.

What we further plan to do (but probably after Oxygen 14 gets released) is to have keyboard shortcuts like "Alt-UP" or "Alt-DOWN" which will be used to move an element before or after its sibling.
So after this is implemented you will be able to place the caret inside a table cell, press "Alt-UP" and thus move the entire row before its previous sibling.
This shortcut will also be useful to move paragraphs or list items up and down as well.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
craig_sandvik
Posts: 5
Joined: Thu Dec 08, 2011 10:41 pm

Re: Moving table rows

Post by craig_sandvik »

Thanks Radu. We are looking forward to 14.

I was able to cut a row in Outline View, but like the drop target, you can't put the insertion point between <row> elements to paste properly in Outline view. However, we found a solution that doesn't use Outline view at all:
1. Put the cursor somewhere in the row and use the Breadcrumb control to select the <row> element.
2. Cut
3. Use the Breadcrumb control and the arrow keys to put the cursor between <row> elements (or after the final <row>).
4. Paste

- craig
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Moving table rows

Post by Radu »

Hi Craig,

My initial suggested approach was a mix of using the Outline to cut, then moving focus back to the editing area, moving the caret in the right location and pasting.
Indeed using the breadcrumb is another good approach.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Moving table rows

Post by Radu »

Hi Craig,

We released Oxygen 15.0 a couple of days ago.
In Oxygen 15.0 you will be able to place the caret inside a cell on the table row and press ALT-UP or ALT-DOWN to move it up or down in the table. The same goes for any element which can be moved, list items, paragraphs, etc.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply