advanced-tables-obsidian
advanced-tables-obsidian copied to clipboard
Feature: Pasting text with line-returns creates multiple rows
Is your feature request related to a problem? Please describe.
I came across a small irritation today. I was pasting a list of servers I'd copied out of my terminal and into a table and hoped they might each make a new record similar to how Excel would behave. Instead, they all went into the first cell. I ended up copying each line one-by-one and pasting that into its own row in the table
Describe the solution you'd like
I'd like to be able to paste text that has line returns (CR, LF, CRLF, whatever you fancy) into a cell, hit enter, and have new rows created, one for each line of text. (Ignore the 2nd column blobs 😅)
Describe alternatives you've considered There might be a way to accomplish the same with espanso or other keyboard-shortcut software.
Additional context I love this plugin! Thanks for making it!
One way I found of doing this in the meantime that was super easy if you happen to have Vim mode on:
- Enter visual line mode
- Highlight all the lines you want to add to the table
- Enter substitute mode and do this:
:'<,'>s/^/| /
This should just add a bar before each line, and they'll get in the table that way. I also would love to see copy+paste support — thank you for this plugin! :D
This could possibly be solved with #78. It's not perfect, but for your use-case it's not far off.
There actually is an editor-paste
event which would allow the plugin to capture the event and possibly alter the text before inserting.