mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 13:29:13 -04:00
feat(new tool): Paste as Markdown
This commit is contained in:
parent
e1b4f9aafe
commit
d72facf062
3 changed files with 26 additions and 0 deletions
|
@ -6,6 +6,7 @@ import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||||
|
|
||||||
import { tool as textToUnicode } from './text-to-unicode';
|
import { tool as textToUnicode } from './text-to-unicode';
|
||||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||||
|
import { tool as pasteAsMarkdown } from './paste-as-markdown';
|
||||||
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
||||||
import { tool as numeronymGenerator } from './numeronym-generator';
|
import { tool as numeronymGenerator } from './numeronym-generator';
|
||||||
import { tool as macAddressGenerator } from './mac-address-generator';
|
import { tool as macAddressGenerator } from './mac-address-generator';
|
||||||
|
@ -172,6 +173,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||||
textDiff,
|
textDiff,
|
||||||
numeronymGenerator,
|
numeronymGenerator,
|
||||||
asciiTextDrawer,
|
asciiTextDrawer,
|
||||||
|
pasteAsMarkdown,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
12
src/tools/paste-as-markdown/index.ts
Normal file
12
src/tools/paste-as-markdown/index.ts
Normal file
|
@ -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 clipboard content as Markdown',
|
||||||
|
keywords: ['paste', 'markdown'],
|
||||||
|
component: () => import('./paste-as-markdown.vue'),
|
||||||
|
icon: Markdown,
|
||||||
|
createdAt: new Date('2024-07-14'),
|
||||||
|
});
|
12
src/tools/paste-as-markdown/paste-as-markdown.vue
Normal file
12
src/tools/paste-as-markdown/paste-as-markdown.vue
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { subscribe } from '@github/paste-markdown';
|
||||||
|
|
||||||
|
// Subscribe the behavior to the textarea.
|
||||||
|
subscribe(document.querySelector('.paste-zone textarea') as never);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<c-card title="Paste in Markdown" class="paste-zone">
|
||||||
|
<textarea-copyable language="markdown" />
|
||||||
|
</c-card>
|
||||||
|
</template>
|
Loading…
Add table
Add a link
Reference in a new issue