ganesshkumar / obsidian-excel-to-markdown-table

An Obsidian plugin to paste data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables in Obsidian editor.
MIT License
202 stars 7 forks source link

[Bug Report] Bypass plugin #8

Closed huyz closed 2 years ago

huyz commented 2 years ago

Is your feature request related to a problem? Please describe. I need to be able to paste some text verbatim that happens to contain tabs. Unfortunately, this plugin assumes that this is a table.

Describe the solution you'd like A way to paste as if obsidian-excel-to-markdown-table were disabled

Describe alternatives you've considered I've tried to "type" text using BetterTouchTool. I've tried option+shift+cmd to paste without formatting. Neither worked.

ganesshkumar commented 2 years ago

Not processing the data if the evt.clipboardData.types contain only 'text/plain should fix this issue

    // Check for `Shift + Mod + V` triggered event.
    // Do not handle `Shift + Mod + V` events.
    if (evt.clipboardData.types.length === 1 && evt.clipboardData.types[0] === 'text/plain') {  
        return;
    }
ganesshkumar commented 2 years ago

@huyz , I have pushed a fix for this and released it as version 0.2.2.

Can you update the plugin from the community plugin and check it?

huyz commented 2 years ago

@ganesshkumar Worked, thanks!

ganesshkumar commented 2 years ago

Thanks for reporting the issue and testing out the update quickly :)

huyz commented 2 years ago

Btw, I don't copy from Excel. I just copy from tables from Apple Notes. Still works just the same! I imagine your plugin works for tables in many different apps too