"Edit Markdown Table" Example Action

I wrote an example action which rolls the excelling Table Magic web-based Markdown table editor into a Drafts HTML Preview-based action.

This action allows you to build and insert, or edit a selected, Markdown table using web-based tools which support preview, editing Markdown directly, or editing in a spreadsheet-style table editor.

If you cancel in the dialog, your changes are discarded. If you “Save Changes”, the updated table is inserted in the editor.

See video for demonstration:

This action likely has some room for improvement, if people have suggestions for tweaking it.

Get the example action from the Directory:

7 Likes

Glad to see CSV.

Is the data going to the web? Or is it somehow local? That would condition my ability to use it - for customer data.

Is alignment a possibility? I know it’s trivial to add that into the Markdown by hand but wonder if that’s a simple “starter contribution”.

The data itself is all local, but it does require Internet to load js/css resources.

I think Table Magic has some basic alignment support, but not in the “Form” editor. I’m sure it could be extended to support it, but does not seem to be a project in active development.

So are we dependent on Table Magic’s development status?

  1. Could we move the js/css to be local?
  2. Could we enhance its function to, say, provide alignment buttons?

I might volunteer - after the current work-related rush - but there’s no point if the above can’t be done.

Well, Table Magic is open source. You could fork it and upgrade that library, or serve a modified version for the action. That’s beyond what I’m trying to accomplish with the example action.

1 Like