You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the Copy As Markdown extension does not convert HTML tables to Markdown. I see from the docs that PopClip has integrated the Turndown package for conversion. @pilotmoon, from their docs it appears the addition of this feature here could be trivial by adding the turndown-plugin-gfm plugin to where Turndown is initialized in the PopClip closed source code. Once this has been completed, I don't believe any modifications to the Copy As Markdown extension are required. I'd make a PR, but I think this feature can only be added within the closed source components. I suppose I could make a forked version of this extension, but this seems like it would only be useful in the short-term.
The text was updated successfully, but these errors were encountered:
I've had a go at implemeting this purely as an extension - see the referencing commit. Note it was developed against latest PopClip Build 3887 from https://pilotmoon.com/popclip/download.
Ideally, if I could get it to work I would integrate it into PopClip itself.
Unfortunately I can't get it to work. I think it may be because in PopClip we're using linkedom instead of JSDOM, so the document model is slightly different to what it is expecting. There's a rows property in the table node that it can't find. I've done as much as I can for now I think.
pilotmoon
changed the title
Unable to copy HTML table as Markdown
Copy HTML tables as Markdown
May 2, 2022
@pilotmoon - This needs to be introduced into the Copy as Markdown extension. In its currently form, it is very limiting. I find myself flicking to VSCode and using Markdown Paste all the time. Could this please be considered?
I noticed that the Copy As Markdown extension does not convert HTML tables to Markdown. I see from the docs that PopClip has integrated the Turndown package for conversion. @pilotmoon, from their docs it appears the addition of this feature here could be trivial by adding the
turndown-plugin-gfm
plugin to where Turndown is initialized in the PopClip closed source code. Once this has been completed, I don't believe any modifications to the Copy As Markdown extension are required. I'd make a PR, but I think this feature can only be added within the closed source components. I suppose I could make a forked version of this extension, but this seems like it would only be useful in the short-term.The text was updated successfully, but these errors were encountered: