cosmocode / edittable

Plugin to provide a custom editor for tables in DokuWiki
https://www.dokuwiki.org/plugin:edittable
32 stars 26 forks source link

Fast way to add new rows? #26

Open marcinz opened 10 years ago

marcinz commented 10 years ago

This may not really be an issue, but is there a fast way to add many rows? As for now, the only way to add a row is through the right-click menu, but I have to add many rows, and right clicking is a slow way to do it.

Thanks.

hh-lohmann commented 10 years ago

It might be an interesting idea to replace, e.g., "Insert row above" by "Insert X row(s) above", where X is a numerical input field, defaulting to "1", but that would be an issue for the third-party table editing software "Handsontable" that is used by edittable, i.e. https://github.com/warpech/jquery-handsontable - I allowed myself to open such an issue there :-).

At the moment, for adding many (empty) rows at once I'd suggest using the "normal" editor, i.e. the "edit" button at the right bottom of the section or "edit" from the main menu instead of the edit button at the left bottom of the table. In normal editing you may just add lines of | | | (one "| " for any column you need + one "| " at the end, e.g. 6 "| " for 5 columns, don't forget space between the "|" to avoid column spanning to one big column; see https://www.dokuwiki.org/wiki:syntax#tables), saving that and then filling the new cells with edittable's nice interface.

Hard work is adding many columns at once in typical line (= row, but not column) based editor, since then you cannot just add to existing table entries, but have to replace the existing ones with "versions" that have more columns than the "originals", for that you may use the normal editing if you are experienced with regular expressions (RegEx), copying tables to a RegEx able editor and pasting them back into DokuWiki's editor.

splitbrain commented 10 years ago

Handsontable has a feature to automatically add a spare row or column. That might be a solution to the problem but it would require stripping out empty rows and columns when saving again and it might be tricky to get it work with my changes for the column/row span.

No ETA for when I can look into it though.

marcinz commented 10 years ago

Thanks for looking at this. I did not think, for some reason, of just editing the table using text. That would probably solve my problem. The nice thing about edittable was that I was able to copy a table from excel and just have it properly paste into edittable. The only problem was that If there was not enough rows in edittable, the pasted table would be truncated to the number of empty rows. But I could have created the rows in text edit mode and then paste the excel table in edittable.

DanBennettUK commented 10 years ago

Didn't this used to happen that you could add other rows? We used to use it quite a lot. Only noticed today that the option is no longer there...

vic-t commented 9 years ago

I second the feature wish. Right now, the tool is great for making changes to an existing table but adding rows is still a bit cumbersome. Would be great if pressing 'tab' in the last row would move the cursor to the first column in a new row.

Thanks Andreas for all the great work so far.

splitbrain commented 9 years ago

Rows and cols can now be added by dragging the autofill marker across the edge of the table

vic-t commented 9 years ago

That's a helpful alternative, thanks!

On 19.08.2015 16:03, Andreas Gohr wrote:

Rows and cols can now be added by dragging the autofill marker across the edge of the table

— Reply to this email directly or view it on GitHub https://github.com/cosmocode/edittable/issues/26#issuecomment-132608586.