Sadly, I can't get it to work, even with the example in the gif, I get Uncaught (in promise) Error: Command not found: editor.execCommand. Make sure the declaration has been registered. in the console. Am I missing something obvious? Using Joplin 1.7.11 win32 (portable).
(the menu option is also in Edit > Format Table for me).
One thing I like in my tables is to have at least one space before and after each value, like | col1 | and not just |col1|. Any chance this could be added?
This what happens when you stay up late to finish things up. Thanks, I'll update the top post.
As for this, right now the plugin assumes that each line must start with a pipe as this was the easiest thing to do.
I'll implement a more sophisticated parser in the next version.
Right, looks like it relies on a change that is not yet available even in pre-releases. I'll update the manifest and we'll have to wait for the next version, sorry.
Hi Roman
Thanks for your great plguins.
Unfortunately I couldn't install this one
I'm using portable version 1.7.11 on Win 10
When searching for it from the app it shows a card with the name of the plubin and beneath it a message 'Please upgrade Joplin to use this plugin
Checking updategives me a message 'version is up to date'
Am i missing somehting?
Unfortunately the plugin relies on functionality that is not available even in pre-releases at this point. I have not noticed it as I was testing against dev version.
We have to wait for the next release.
No problem, I figured that was the case, I saw some other plugins only compatible with 1.8. I now have the 'Please update Joplin to use this plugin' message.
In any case, I am really looking forward to this plugin, I have a lot of tables in my notes and I had to spend quite a bit of time to correct the formatting a couple days ago.
Maybe I should just use the table format that is supported. I think it is required anyway, if one wants to do left/right/center alignment in columns.
I just have to get used to it that's all. I can change my existing tables over time.
I wouldn't be too unhappy about support for "my" table format either. But if it makes the parser too complex it might not be worth it.
Me too. But it could be beneficial to use a compact format as well. This is very subjective and depends on people's preference.
It could be added via an option though. If roman_r_m is ok with it, I can create a PR for it. (Not right now, but when I have a bit more time.)
@roman_r_m you might be interested in the prettier code formatter. I had originally written a "Prettify Selection" command into my rich markdown plugin, but unfortunately it does not work on the current version, so it's been commented out for awhile. You can see the code I used here.
In any case I think that kind of functionality is probably better in a separate plugin. If you're interested I think it would be great to combine the prettier tool with your plugin. I'd be happy to help contribute as well if you'd like.
Thanks Caleb. I had a look at the prettier lib and looks like it's all I need, it already seems to have MD table formatter built-in.
I'll give it a try over the next few days. Contributions are always welcome of course.
Hi nice plugin, however it breaks when left/right/center column alignment is used. Not a huge deal to rectify manually but thought I'd mention if it's able to be fixed. Thanks again.
Hmm...seems to work fine for me. I use the basic colon formatting like this:
| Column 1 | Column 2 |
|---------:|:----------:|
| Foo | Bar |
| Foo | Bar |
I've assigned a hotkey to the "Format Table" menu option so, after making table changes, I press the hotkey, and the text table appears to be formatted properly. Are you doing something differently?
Here you go, thanks for taking a look. I have Tabs plugin but see the same result with Tabs disabled. Also see the same result with the line break removed. Any issues with my formatting?
I should mention I'm using Windows portable v1.8.5
So why not use prettier? Or use a more primitive remark for parsing. You only need to deal with alignment issues. There is no need to recreate the wheels of the markdown parser.