diff --git a/components.d.ts b/components.d.ts
index 8e59366a..b7392bd8 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -140,16 +140,20 @@ declare module '@vue/runtime-core' {
NH1: typeof import('naive-ui')['NH1']
NH3: typeof import('naive-ui')['NH3']
NIcon: typeof import('naive-ui')['NIcon']
+ NInput: typeof import('naive-ui')['NInput']
NInputNumber: typeof import('naive-ui')['NInputNumber']
NLayout: typeof import('naive-ui')['NLayout']
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
+ NLi: typeof import('naive-ui')['NLi']
NMenu: typeof import('naive-ui')['NMenu']
+ NP: typeof import('naive-ui')['NP']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSlider: typeof import('naive-ui')['NSlider']
NSwitch: typeof import('naive-ui')['NSwitch']
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
+ PasteAsMarkdown: typeof import('./src/tools/paste-as-markdown/paste-as-markdown.vue')['default']
PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default']
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
PercentageCalculator: typeof import('./src/tools/percentage-calculator/percentage-calculator.vue')['default']
diff --git a/package.json b/package.json
index 63e5856a..33a876e5 100644
--- a/package.json
+++ b/package.json
@@ -35,6 +35,7 @@
"release": "node ./scripts/release.mjs"
},
"dependencies": {
+ "@github/paste-markdown": "^1.5.3",
"@it-tools/bip39": "^0.0.4",
"@it-tools/oggen": "^1.3.0",
"@sindresorhus/slugify": "^2.2.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2311f3af..1614e612 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
dependencies:
+ '@github/paste-markdown':
+ specifier: ^1.5.3
+ version: 1.5.3
'@it-tools/bip39':
specifier: ^0.0.4
version: 0.0.4
@@ -2165,6 +2168,10 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
+ /@github/paste-markdown@1.5.3:
+ resolution: {integrity: sha512-PzZ1b3PaqBzYqbT4fwKEhiORf38h2OcGp2+JdXNNM7inZ7egaSmfmhyNkQILpqWfS0AYtRS3CDq6z03eZ8yOMQ==}
+ dev: false
+
/@humanwhocodes/config-array@0.11.10:
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
engines: {node: '>=10.10.0'}
diff --git a/src/tools/index.ts b/src/tools/index.ts
index c9003fe8..294faef8 100644
--- a/src/tools/index.ts
+++ b/src/tools/index.ts
@@ -9,6 +9,7 @@ import { tool as textToUnicode } from './text-to-unicode';
import { tool as safelinkDecoder } from './safelink-decoder';
import { tool as xmlToJson } from './xml-to-json';
import { tool as jsonToXml } from './json-to-xml';
+import { tool as pasteAsMarkdown } from './paste-as-markdown';
import { tool as markdownToHtml } from './markdown-to-html';
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
import { tool as numeronymGenerator } from './numeronym-generator';
@@ -180,6 +181,7 @@ export const toolsByCategory: ToolCategory[] = [
textDiff,
numeronymGenerator,
asciiTextDrawer,
+ pasteAsMarkdown,
],
},
{
diff --git a/src/tools/paste-as-markdown/index.ts b/src/tools/paste-as-markdown/index.ts
new file mode 100644
index 00000000..e9394f04
--- /dev/null
+++ b/src/tools/paste-as-markdown/index.ts
@@ -0,0 +1,12 @@
+import { Markdown } from '@vicons/tabler';
+import { defineTool } from '../tool';
+
+export const tool = defineTool({
+ name: 'Paste as Markdown',
+ path: '/paste-as-markdown',
+ description: 'Paste cells/tables and links from clipboard content as Markdown',
+ keywords: ['paste', 'cell', 'table', 'links', 'md', 'markdown'],
+ component: () => import('./paste-as-markdown.vue'),
+ icon: Markdown,
+ createdAt: new Date('2024-07-14'),
+});
diff --git a/src/tools/paste-as-markdown/paste-as-markdown.vue b/src/tools/paste-as-markdown/paste-as-markdown.vue
new file mode 100644
index 00000000..fecdc70e
--- /dev/null
+++ b/src/tools/paste-as-markdown/paste-as-markdown.vue
@@ -0,0 +1,31 @@
+
+
+
+
+
+ Paste spreadsheet cells and HTML tables as a Markdown tables.
+ Paste URLs on selected text as Markdown links.
+ Paste text containing links as text containing Markdown links.
+ Paste image URLs as Markdown image links.
+
+
+
+
diff --git a/src/ui/c-input-text/c-input-text.vue b/src/ui/c-input-text/c-input-text.vue
index b5f423d2..c49fbf53 100644
--- a/src/ui/c-input-text/c-input-text.vue
+++ b/src/ui/c-input-text/c-input-text.vue
@@ -137,6 +137,8 @@ onMounted(() => {
defineExpose({
inputWrapperRef,
+ textareaRef,
+ inputRef,
focus,
blur,
});