I was trying to advise a user on how they might import a Google Doc into Discourse as a new topic and suggested trying to copy/paste the doc into an email and then email it in. It mostly worked, but there were a few tables in the doc that got mangled in the process.
When an email into Discourse includes an HTML table, that table gets mangled and turned into plaintext on the Discourse side.
I have the incoming_email_prefer_html on as well as the “allow html tables” setting.
It’d be cool if tables were just skipped and maintained as HTML in that case. (Or perhaps there’s a table extension we’re planning on enabling once the markdown-it is in the mix?)
Yes, it will work better if the user used copy-paste method instead of email-in workaround.
HTML pasting feature uses client side JavaScript for Markdown conversion. But for incoming emails we converting it in server side using our custom converter which doesn’t support Markdown tables yet.
I happen to receive emails containing tables, and the first table and anything trailing it doesn’t survive the translation to Markdown. This makes messages break off abruptly, which is very confusing for users. They can read the original HTML email by clicking the little envelope, but that’s hardly user-friendly and should probably be regarded as a bug.
Editing the message and pasting the raw HTML table into it seems to work well. Why not do this during Markdown conversion?