trilium icon indicating copy to clipboard operation
trilium copied to clipboard

[FEATURE] Copy/Paste Table As/From CSV

Open nil0x42 opened this issue 4 years ago • 5 comments

Hi !

Intro

Ability to do more with tables is a highly requested feature (https://github.com/zadam/trilium/issues/410, https://github.com/zadam/trilium/issues/1586, https://github.com/zadam/trilium/issues/1691, etc). Therefore most feature request are either very specific, or very hard to implement.

Feature request

Implement CSV import from clipboard and paste CSV as table buttons. This allows user to easily do what they want, handling many, many cases:

  • sort/filter/orderBy on a table
    • i can just copy table as CSV, open it with an external software allowing such table manipulations
    • if i want to update result, i can export as CSV from my tool, and paste back to trilium.
    • of course power users are free to automate this by binding shortcuts in their OS to "open table tool with clipboard content as CSV", etc..
  • import a table from any software into trilium:
    • export as CSV is a feature that almost every table software has, so it should make it trivial
  • export a trilium table somewhere else:
    • same as above, import CSV is a very common feature in table handling softwares.

Implementation suggestion

As trilium specific buttons were added to ckeditor's Edit Block floating menu, i imagine it would be similar to add custom buttons into ckeditor's table options menu: Screenshot_2021-02-26_20-48-33

nil0x42 avatar Feb 26 '21 20:02 nil0x42

Hi, you can just copy paste tables from Excel or similar software, no need to go through CSV export/import step.

For the other suggestions regarding more features for table I'm skeptical. Table plugin in CKEditor is pretty complex on its own, extending it will not be easy. There's also almost infinite amount of possible things to add there ...

Instead it might be better to implement some ready made advanced table component like handsontable, jExcel or similar. But I'm not yet clear on how exactly to do that (and if at all).

zadam avatar Feb 26 '21 22:02 zadam

i cannot copy tables how do we do that??? i am trying to copy from libroffice calc .. What should be the note type to copy a table? I try to paste in text type note, doesn't work

SHx7ejs7fCrP avatar Feb 27 '21 00:02 SHx7ejs7fCrP

Yes, Libreoffice Calc should work. Text type is also correct. See this:

zadam avatar Feb 27 '21 19:02 zadam

yea dunno why it wasn't working yesterday, it does work now. The thing that separates your wiki night and day is table support, and such great table support... Wish you would add features to it...

SHx7ejs7fCrP avatar Feb 27 '21 22:02 SHx7ejs7fCrP

+1 on this. csv is such a better format (syntax wise)

plashal avatar Jan 17 '24 18:01 plashal

Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: https://github.com/TriliumNext/Notes/issues/90

meichthys avatar May 09 '24 03:05 meichthys