mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-08 07:11:03 -04:00
Linting Fixes
This commit is contained in:
parent
16aa76d350
commit
28c9808c1c
3 changed files with 10 additions and 8 deletions
|
@ -8,6 +8,6 @@ const turnDownService = new TurnDownService();
|
|||
* @param html - The HTML string to convert.
|
||||
* @returns The converted Markdown string.
|
||||
*/
|
||||
export const convertHtmlToMarkdown = (html: string): string => {
|
||||
export function convertHtmlToMarkdown(html: string): string {
|
||||
return turnDownService.turndown(html);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { convertHtmlToMarkdown } from './html-md-converter-service'; // Import the service function
|
||||
|
||||
const htmlInput = ref(''); // Reference for HTML input
|
||||
const markdownOutput = ref(''); // Reference for Markdown output
|
||||
|
||||
const convertHtmlToMd = () => {
|
||||
function convertHtmlToMd() {
|
||||
markdownOutput.value = convertHtmlToMarkdown(htmlInput.value); // Using the service function here
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -16,7 +17,9 @@ const convertHtmlToMd = () => {
|
|||
<c-input-text v-model:value="htmlInput" multiline placeholder="Paste your HTML here..." rows="5" />
|
||||
|
||||
<!-- Convert button -->
|
||||
<button @click="convertHtmlToMd">Convert</button>
|
||||
<button @click="convertHtmlToMd">
|
||||
Convert
|
||||
</button>
|
||||
|
||||
<!-- Display area for converted Markdown -->
|
||||
<c-input-text v-model:value="markdownOutput" multiline placeholder="Converted Markdown will appear here..." rows="5" />
|
||||
|
@ -24,4 +27,3 @@ const convertHtmlToMd = () => {
|
|||
<!-- Optionally, you can add more features like 'Clear', 'Copy to Clipboard', etc. -->
|
||||
</c-card>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue