parent
							
								
									a07806cd15
								
							
						
					
					
						commit
						ccd6deb793
					
				
							
								
								
									
										1
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -129,6 +129,7 @@ declare module '@vue/runtime-core' { | ||||
|     LoremIpsumGenerator: typeof import('./src/tools/lorem-ipsum-generator/lorem-ipsum-generator.vue')['default'] | ||||
|     MacAddressGenerator: typeof import('./src/tools/mac-address-generator/mac-address-generator.vue')['default'] | ||||
|     MacAddressLookup: typeof import('./src/tools/mac-address-lookup/mac-address-lookup.vue')['default'] | ||||
|     MarkdownToHtml: typeof import('./src/tools/markdown-to-html/markdown-to-html.vue')['default'] | ||||
|     MathEvaluator: typeof import('./src/tools/math-evaluator/math-evaluator.vue')['default'] | ||||
|     MenuBar: typeof import('./src/tools/html-wysiwyg-editor/editor/menu-bar.vue')['default'] | ||||
|     MenuBarItem: typeof import('./src/tools/html-wysiwyg-editor/editor/menu-bar-item.vue')['default'] | ||||
|  | ||||
| @ -41,6 +41,7 @@ | ||||
|     "@tiptap/pm": "2.1.6", | ||||
|     "@tiptap/starter-kit": "2.1.6", | ||||
|     "@tiptap/vue-3": "2.0.3", | ||||
|     "@types/markdown-it": "^13.0.7", | ||||
|     "@vicons/material": "^0.12.0", | ||||
|     "@vicons/tabler": "^0.12.0", | ||||
|     "@vueuse/core": "^10.3.0", | ||||
| @ -66,6 +67,7 @@ | ||||
|     "jwt-decode": "^3.1.2", | ||||
|     "libphonenumber-js": "^1.10.28", | ||||
|     "lodash": "^4.17.21", | ||||
|     "markdown-it": "^14.0.0", | ||||
|     "marked": "^10.0.0", | ||||
|     "mathjs": "^11.9.1", | ||||
|     "mime-types": "^2.1.35", | ||||
|  | ||||
							
								
								
									
										59
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										59
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -23,6 +23,9 @@ dependencies: | ||||
|   '@tiptap/vue-3': | ||||
|     specifier: 2.0.3 | ||||
|     version: 2.0.3(@tiptap/core@2.1.12)(@tiptap/pm@2.1.6)(vue@3.3.4) | ||||
|   '@types/markdown-it': | ||||
|     specifier: ^13.0.7 | ||||
|     version: 13.0.7 | ||||
|   '@vicons/material': | ||||
|     specifier: ^0.12.0 | ||||
|     version: 0.12.0 | ||||
| @ -98,6 +101,9 @@ dependencies: | ||||
|   lodash: | ||||
|     specifier: ^4.17.21 | ||||
|     version: 4.17.21 | ||||
|   markdown-it: | ||||
|     specifier: ^14.0.0 | ||||
|     version: 14.0.0 | ||||
|   marked: | ||||
|     specifier: ^10.0.0 | ||||
|     version: 10.0.0 | ||||
| @ -2933,7 +2939,6 @@ packages: | ||||
| 
 | ||||
|   /@types/linkify-it@3.0.2: | ||||
|     resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==} | ||||
|     dev: true | ||||
| 
 | ||||
|   /@types/lodash-es@4.17.10: | ||||
|     resolution: {integrity: sha512-YJP+w/2khSBwbUSFdGsSqmDvmnN3cCKoPOL7Zjle6s30ZtemkkqhjVfFqGwPN7ASil5VyjE2GtyU/yqYY6mC0A==} | ||||
| @ -2955,6 +2960,13 @@ packages: | ||||
|       '@types/mdurl': 1.0.2 | ||||
|     dev: true | ||||
| 
 | ||||
|   /@types/markdown-it@13.0.7: | ||||
|     resolution: {integrity: sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==} | ||||
|     dependencies: | ||||
|       '@types/linkify-it': 3.0.2 | ||||
|       '@types/mdurl': 1.0.2 | ||||
|     dev: false | ||||
| 
 | ||||
|   /@types/mdast@3.0.11: | ||||
|     resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} | ||||
|     dependencies: | ||||
| @ -2963,7 +2975,6 @@ packages: | ||||
| 
 | ||||
|   /@types/mdurl@1.0.2: | ||||
|     resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} | ||||
|     dev: true | ||||
| 
 | ||||
|   /@types/mime-types@2.1.1: | ||||
|     resolution: {integrity: sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw==} | ||||
| @ -3341,7 +3352,7 @@ packages: | ||||
|     dependencies: | ||||
|       '@unhead/dom': 0.5.1 | ||||
|       '@unhead/schema': 0.5.1 | ||||
|       '@vueuse/shared': 10.7.2(vue@3.3.4) | ||||
|       '@vueuse/shared': 10.9.0(vue@3.3.4) | ||||
|       unhead: 0.5.1 | ||||
|       vue: 3.3.4 | ||||
|     transitivePeerDependencies: | ||||
| @ -3983,10 +3994,10 @@ packages: | ||||
|       - vue | ||||
|     dev: false | ||||
| 
 | ||||
|   /@vueuse/shared@10.7.2(vue@3.3.4): | ||||
|     resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==} | ||||
|   /@vueuse/shared@10.9.0(vue@3.3.4): | ||||
|     resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==} | ||||
|     dependencies: | ||||
|       vue-demi: 0.14.6(vue@3.3.4) | ||||
|       vue-demi: 0.14.7(vue@3.3.4) | ||||
|     transitivePeerDependencies: | ||||
|       - '@vue/composition-api' | ||||
|       - vue | ||||
| @ -4991,7 +5002,6 @@ packages: | ||||
|   /entities@4.5.0: | ||||
|     resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} | ||||
|     engines: {node: '>=0.12'} | ||||
|     dev: true | ||||
| 
 | ||||
|   /errno@0.1.8: | ||||
|     resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} | ||||
| @ -6653,6 +6663,12 @@ packages: | ||||
|     dependencies: | ||||
|       uc.micro: 1.0.6 | ||||
| 
 | ||||
|   /linkify-it@5.0.0: | ||||
|     resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} | ||||
|     dependencies: | ||||
|       uc.micro: 2.1.0 | ||||
|     dev: false | ||||
| 
 | ||||
|   /local-pkg@0.4.3: | ||||
|     resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} | ||||
|     engines: {node: '>=14'} | ||||
| @ -6790,6 +6806,18 @@ packages: | ||||
|       mdurl: 1.0.1 | ||||
|       uc.micro: 1.0.6 | ||||
| 
 | ||||
|   /markdown-it@14.0.0: | ||||
|     resolution: {integrity: sha512-seFjF0FIcPt4P9U39Bq1JYblX0KZCjDLFFQPHpL5AzHpqPEKtosxmdq/LTVZnjfH7tjt9BxStm+wXcDBNuYmzw==} | ||||
|     hasBin: true | ||||
|     dependencies: | ||||
|       argparse: 2.0.1 | ||||
|       entities: 4.5.0 | ||||
|       linkify-it: 5.0.0 | ||||
|       mdurl: 2.0.0 | ||||
|       punycode.js: 2.3.1 | ||||
|       uc.micro: 2.1.0 | ||||
|     dev: false | ||||
| 
 | ||||
|   /marked@10.0.0: | ||||
|     resolution: {integrity: sha512-YiGcYcWj50YrwBgNzFoYhQ1hT6GmQbFG8SksnYJX1z4BXTHSOrz1GB5/Jm2yQvMg4nN1FHP4M6r03R10KrVUiA==} | ||||
|     engines: {node: '>= 18'} | ||||
| @ -6838,6 +6866,10 @@ packages: | ||||
|   /mdurl@1.0.1: | ||||
|     resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} | ||||
| 
 | ||||
|   /mdurl@2.0.0: | ||||
|     resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} | ||||
|     dev: false | ||||
| 
 | ||||
|   /merge-stream@2.0.0: | ||||
|     resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} | ||||
|     dev: true | ||||
| @ -7647,6 +7679,11 @@ packages: | ||||
|     resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} | ||||
|     dev: true | ||||
| 
 | ||||
|   /punycode.js@2.3.1: | ||||
|     resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} | ||||
|     engines: {node: '>=6'} | ||||
|     dev: false | ||||
| 
 | ||||
|   /punycode@2.3.0: | ||||
|     resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} | ||||
|     engines: {node: '>=6'} | ||||
| @ -8587,6 +8624,10 @@ packages: | ||||
|   /uc.micro@1.0.6: | ||||
|     resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} | ||||
| 
 | ||||
|   /uc.micro@2.1.0: | ||||
|     resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} | ||||
|     dev: false | ||||
| 
 | ||||
|   /ufo@1.1.2: | ||||
|     resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} | ||||
| 
 | ||||
| @ -9135,8 +9176,8 @@ packages: | ||||
|       vue: 3.3.4 | ||||
|     dev: false | ||||
| 
 | ||||
|   /vue-demi@0.14.6(vue@3.3.4): | ||||
|     resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} | ||||
|   /vue-demi@0.14.7(vue@3.3.4): | ||||
|     resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} | ||||
|     engines: {node: '>=12'} | ||||
|     hasBin: true | ||||
|     requiresBuild: true | ||||
|  | ||||
| @ -7,6 +7,7 @@ import sqlHljs from 'highlight.js/lib/languages/sql'; | ||||
| import xmlHljs from 'highlight.js/lib/languages/xml'; | ||||
| import yamlHljs from 'highlight.js/lib/languages/yaml'; | ||||
| import iniHljs from 'highlight.js/lib/languages/ini'; | ||||
| import markdownHljs from 'highlight.js/lib/languages/markdown'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| 
 | ||||
| const props = withDefaults( | ||||
| @ -30,6 +31,7 @@ hljs.registerLanguage('html', xmlHljs); | ||||
| hljs.registerLanguage('xml', xmlHljs); | ||||
| hljs.registerLanguage('yaml', yamlHljs); | ||||
| hljs.registerLanguage('toml', iniHljs); | ||||
| hljs.registerLanguage('markdown', markdownHljs); | ||||
| 
 | ||||
| const { value, language, followHeightOf, copyPlacement, copyMessage } = toRefs(props); | ||||
| const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) }; | ||||
|  | ||||
| @ -2,6 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter'; | ||||
| import { tool as base64StringConverter } from './base64-string-converter'; | ||||
| import { tool as basicAuthGenerator } from './basic-auth-generator'; | ||||
| import { tool as textToUnicode } from './text-to-unicode'; | ||||
| import { tool as markdownToHtml } from './markdown-to-html'; | ||||
| import { tool as pdfSignatureChecker } from './pdf-signature-checker'; | ||||
| import { tool as numeronymGenerator } from './numeronym-generator'; | ||||
| import { tool as macAddressGenerator } from './mac-address-generator'; | ||||
| @ -103,6 +104,7 @@ export const toolsByCategory: ToolCategory[] = [ | ||||
|       listConverter, | ||||
|       tomlToJson, | ||||
|       tomlToYaml, | ||||
|       markdownToHtml, | ||||
|     ], | ||||
|   }, | ||||
|   { | ||||
|  | ||||
							
								
								
									
										12
									
								
								src/tools/markdown-to-html/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/tools/markdown-to-html/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | ||||
| import { Markdown } from '@vicons/tabler'; | ||||
| import { defineTool } from '../tool'; | ||||
| 
 | ||||
| export const tool = defineTool({ | ||||
|   name: 'Markdown to html', | ||||
|   path: '/markdown-to-html', | ||||
|   description: '', | ||||
|   keywords: ['markdown', 'html', 'converter'], | ||||
|   component: () => import('./markdown-to-html.vue'), | ||||
|   icon: Markdown, | ||||
|   createdAt: new Date('2024-02-25'), | ||||
| }); | ||||
							
								
								
									
										29
									
								
								src/tools/markdown-to-html/markdown-to-html.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								src/tools/markdown-to-html/markdown-to-html.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | ||||
| <script setup lang="ts"> | ||||
| import markdownit from 'markdown-it'; | ||||
| import TextareaCopyable from '@/components/TextareaCopyable.vue'; | ||||
| 
 | ||||
| const inputMarkdown = ref(''); | ||||
| const outputHtml = computed(() => { | ||||
|   const md = markdownit(); | ||||
|   return md.render(inputMarkdown.value); | ||||
| }); | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|   <div> | ||||
|     <c-input-text | ||||
|       v-model:value="inputMarkdown" | ||||
|       multiline raw-text | ||||
|       placeholder="Your Markdown content..." | ||||
|       rows="8" | ||||
|       autofocus | ||||
|       label="Your Markdown to convert:" | ||||
|     /> | ||||
| 
 | ||||
|     <n-divider /> | ||||
| 
 | ||||
|     <n-form-item label="Output HTML:"> | ||||
|       <TextareaCopyable :value="outputHtml" :word-wrap="true" language="html" /> | ||||
|     </n-form-item> | ||||
|   </div> | ||||
| </template> | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user