mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
1 parent
5e3648e141
commit
9f5f7d80de
2 files changed
+52
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<script setup lang="ts">
|
||||
import { minify } from 'htmlfy';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
|
||||
const inputHtml = ref('');
|
||||
const outputHtml = computed(() => {
|
||||
try {
|
||||
return minify(inputHtml.value);
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text
|
||||
v-model:value="inputHtml"
|
||||
multiline raw-text
|
||||
placeholder="Your HTML content..."
|
||||
rows="8"
|
||||
autofocus
|
||||
label="Your HTML to minify (can paste from clipboard):"
|
||||
paste-html
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<n-form-item label="Output minified HTML:">
|
||||
<TextareaCopyable
|
||||
:value="outputHtml"
|
||||
multiline
|
||||
language="html"
|
||||
:word-wrap="true"
|
||||
/>
|
||||
</n-form-item>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { BrandHtml5 } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'HTML Minifier',
|
||||
path: '/html-minifier',
|
||||
description: 'Minify HTML content',
|
||||
keywords: ['html', 'minifier'],
|
||||
component: () => import('./html-minifier.vue'),
|
||||
icon: BrandHtml5,
|
||||
createdAt: new Date('2025-07-06'),
|
||||
category: 'Web',
|
||||
});
|
||||
Reference in new issue
Block a user