Skip to content

Commit 7191784

Browse files
committed
ignore the editor-paste event if the type of the clipboard data event is just text/plain; resolves #8
1 parent 1ebdb3d commit 7191784

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Excel to Markdown Banner](https://user-images.githubusercontent.com/2135089/153448883-7ff1b12a-aaca-4eb5-b1e3-4bc227481d04.gif)
44

5-
[![Tag 0.2.1](https://img.shields.io/badge/tag-0.2.1-blue)](https://github.com/ganesshkumar/obsidian-excel-to-markdown-table/releases/tag/0.2.1)
5+
[![Tag 0.2.2](https://img.shields.io/badge/tag-0.2.2-blue)](https://github.com/ganesshkumar/obsidian-excel-to-markdown-table/releases/tag/0.2.2)
66
[![MIT License](https://img.shields.io/github/license/ganesshkumar/obsidian-excel-to-markdown-table)](LICENSE)
77

88
An Obsidian plugin to paste data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables in Obsidian editor.

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-excel-to-markdown-table",
33
"name": "Excel to Markdown Table",
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"minAppVersion": "0.12.0",
66
"description": "An Obsidian plugin to paste data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables in Obsidian editor.",
77
"author": "Ganessh Kumar R P <rpganesshkumar@gmail.com>",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-excel-to-markdown-table",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "An Obsidian plugin to paste data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables in Obsidian editor.",
55
"main": "main.js",
66
"scripts": {

src/main.ts

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export default class ExcelToMarkdownTablePlugin extends Plugin {
77
return;
88
}
99

10+
// Check for `Shift + Mod + V` triggered event.
11+
// Do not handle `Shift + Mod + V` events.
12+
if (evt.clipboardData.types.length === 1 && evt.clipboardData.types[0] === 'text/plain') {
13+
return;
14+
}
15+
1016
const rawData = evt.clipboardData.getData("text");
1117
const rows = getExcelRows(rawData);
1218

versions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"0.1.0": "0.12.0",
33
"0.1.1": "0.12.0",
44
"0.2.0": "0.12.0",
5-
"0.2.1": "0.12.0"
5+
"0.2.1": "0.12.0",
6+
"0.2.2": "0.12.0"
67
}

0 commit comments

Comments
 (0)