How does Discourse convert Excel tables to images when pasting?

(Pratyush Mittal) #1

When I copy a data from Excel / OpenOffice to Discourse, it auto-magically converts it to an image which retains all the borders, cell highlights and styles. How does it work?

If possible, I will try to extend it to other tables too, such as tables from Google Spreadsheets and tables from html content.

(Sam Saffron) #2

This is not a Discourse feature, excel does this magic behind the scenes.

(Kane York) #3

IIRC it’s that you can place multiple MIME-types on the clipboard, and the paste receiver can inspect the list and ask for the one it wants.