Merge branch 'main' into translatable
This commit is contained in:
		
						commit
						b986c49df6
					
				
							
								
								
									
										2
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -121,6 +121,7 @@ declare module '@vue/runtime-core' { | |||||||
|     LoremIpsumGenerator: typeof import('./src/tools/lorem-ipsum-generator/lorem-ipsum-generator.vue')['default'] |     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'] |     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'] |     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'] |     MathEvaluator: typeof import('./src/tools/math-evaluator/math-evaluator.vue')['default'] | ||||||
|     MenuBar: typeof import('./src/tools/html-wysiwyg-editor/editor/menu-bar.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'] |     MenuBarItem: typeof import('./src/tools/html-wysiwyg-editor/editor/menu-bar-item.vue')['default'] | ||||||
| @ -129,6 +130,7 @@ declare module '@vue/runtime-core' { | |||||||
|     MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default'] |     MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default'] | ||||||
|     MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default'] |     MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default'] | ||||||
|     NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default'] |     NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default'] | ||||||
|  |     NButton: typeof import('naive-ui')['NButton'] | ||||||
|     NCode: typeof import('naive-ui')['NCode'] |     NCode: typeof import('naive-ui')['NCode'] | ||||||
|     NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] |     NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] | ||||||
|     NConfigProvider: typeof import('naive-ui')['NConfigProvider'] |     NConfigProvider: typeof import('naive-ui')['NConfigProvider'] | ||||||
|  | |||||||
| @ -41,6 +41,7 @@ | |||||||
|     "@tiptap/pm": "2.1.6", |     "@tiptap/pm": "2.1.6", | ||||||
|     "@tiptap/starter-kit": "2.1.6", |     "@tiptap/starter-kit": "2.1.6", | ||||||
|     "@tiptap/vue-3": "2.0.3", |     "@tiptap/vue-3": "2.0.3", | ||||||
|  |     "@types/markdown-it": "^13.0.7", | ||||||
|     "@types/figlet": "^1.5.8", |     "@types/figlet": "^1.5.8", | ||||||
|     "@vicons/material": "^0.12.0", |     "@vicons/material": "^0.12.0", | ||||||
|     "@vicons/tabler": "^0.12.0", |     "@vicons/tabler": "^0.12.0", | ||||||
| @ -70,6 +71,7 @@ | |||||||
|     "jwt-decode": "^3.1.2", |     "jwt-decode": "^3.1.2", | ||||||
|     "libphonenumber-js": "^1.10.28", |     "libphonenumber-js": "^1.10.28", | ||||||
|     "lodash": "^4.17.21", |     "lodash": "^4.17.21", | ||||||
|  |     "markdown-it": "^14.0.0", | ||||||
|     "marked": "^10.0.0", |     "marked": "^10.0.0", | ||||||
|     "mathjs": "^11.9.1", |     "mathjs": "^11.9.1", | ||||||
|     "mime-types": "^2.1.35", |     "mime-types": "^2.1.35", | ||||||
|  | |||||||
							
								
								
									
										61
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										61
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -26,6 +26,9 @@ dependencies: | |||||||
|   '@types/figlet': |   '@types/figlet': | ||||||
|     specifier: ^1.5.8 |     specifier: ^1.5.8 | ||||||
|     version: 1.5.8 |     version: 1.5.8 | ||||||
|  |   '@types/markdown-it': | ||||||
|  |     specifier: ^13.0.7 | ||||||
|  |     version: 13.0.9 | ||||||
|   '@vicons/material': |   '@vicons/material': | ||||||
|     specifier: ^0.12.0 |     specifier: ^0.12.0 | ||||||
|     version: 0.12.0 |     version: 0.12.0 | ||||||
| @ -110,6 +113,9 @@ dependencies: | |||||||
|   lodash: |   lodash: | ||||||
|     specifier: ^4.17.21 |     specifier: ^4.17.21 | ||||||
|     version: 4.17.21 |     version: 4.17.21 | ||||||
|  |   markdown-it: | ||||||
|  |     specifier: ^14.0.0 | ||||||
|  |     version: 14.1.0 | ||||||
|   marked: |   marked: | ||||||
|     specifier: ^10.0.0 |     specifier: ^10.0.0 | ||||||
|     version: 10.0.0 |     version: 10.0.0 | ||||||
| @ -2952,7 +2958,6 @@ packages: | |||||||
| 
 | 
 | ||||||
|   /@types/linkify-it@3.0.2: |   /@types/linkify-it@3.0.2: | ||||||
|     resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==} |     resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==} | ||||||
|     dev: true |  | ||||||
| 
 | 
 | ||||||
|   /@types/lodash-es@4.17.10: |   /@types/lodash-es@4.17.10: | ||||||
|     resolution: {integrity: sha512-YJP+w/2khSBwbUSFdGsSqmDvmnN3cCKoPOL7Zjle6s30ZtemkkqhjVfFqGwPN7ASil5VyjE2GtyU/yqYY6mC0A==} |     resolution: {integrity: sha512-YJP+w/2khSBwbUSFdGsSqmDvmnN3cCKoPOL7Zjle6s30ZtemkkqhjVfFqGwPN7ASil5VyjE2GtyU/yqYY6mC0A==} | ||||||
| @ -2974,6 +2979,13 @@ packages: | |||||||
|       '@types/mdurl': 1.0.2 |       '@types/mdurl': 1.0.2 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|  |   /@types/markdown-it@13.0.9: | ||||||
|  |     resolution: {integrity: sha512-1XPwR0+MgXLWfTn9gCsZ55AHOKW1WN+P9vr0PaQh5aerR9LLQXUbjfEAFhjmEmyoYFWAyuN2Mqkn40MZ4ukjBw==} | ||||||
|  |     dependencies: | ||||||
|  |       '@types/linkify-it': 3.0.2 | ||||||
|  |       '@types/mdurl': 1.0.2 | ||||||
|  |     dev: false | ||||||
|  | 
 | ||||||
|   /@types/mdast@3.0.11: |   /@types/mdast@3.0.11: | ||||||
|     resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} |     resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} | ||||||
|     dependencies: |     dependencies: | ||||||
| @ -2982,7 +2994,6 @@ packages: | |||||||
| 
 | 
 | ||||||
|   /@types/mdurl@1.0.2: |   /@types/mdurl@1.0.2: | ||||||
|     resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} |     resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} | ||||||
|     dev: true |  | ||||||
| 
 | 
 | ||||||
|   /@types/mime-types@2.1.1: |   /@types/mime-types@2.1.1: | ||||||
|     resolution: {integrity: sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw==} |     resolution: {integrity: sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw==} | ||||||
| @ -3360,7 +3371,7 @@ packages: | |||||||
|     dependencies: |     dependencies: | ||||||
|       '@unhead/dom': 0.5.1 |       '@unhead/dom': 0.5.1 | ||||||
|       '@unhead/schema': 0.5.1 |       '@unhead/schema': 0.5.1 | ||||||
|       '@vueuse/shared': 10.11.1(vue@3.3.4) |       '@vueuse/shared': 11.0.3(vue@3.3.4) | ||||||
|       unhead: 0.5.1 |       unhead: 0.5.1 | ||||||
|       vue: 3.3.4 |       vue: 3.3.4 | ||||||
|     transitivePeerDependencies: |     transitivePeerDependencies: | ||||||
| @ -3993,19 +4004,19 @@ packages: | |||||||
|       - vue |       - vue | ||||||
|     dev: false |     dev: false | ||||||
| 
 | 
 | ||||||
|   /@vueuse/shared@10.11.1(vue@3.3.4): |   /@vueuse/shared@10.3.0(vue@3.3.4): | ||||||
|     resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==} |     resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==} | ||||||
|     dependencies: |     dependencies: | ||||||
|       vue-demi: 0.14.10(vue@3.3.4) |       vue-demi: 0.14.5(vue@3.3.4) | ||||||
|     transitivePeerDependencies: |     transitivePeerDependencies: | ||||||
|       - '@vue/composition-api' |       - '@vue/composition-api' | ||||||
|       - vue |       - vue | ||||||
|     dev: false |     dev: false | ||||||
| 
 | 
 | ||||||
|   /@vueuse/shared@10.3.0(vue@3.3.4): |   /@vueuse/shared@11.0.3(vue@3.3.4): | ||||||
|     resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==} |     resolution: {integrity: sha512-0rY2m6HS5t27n/Vp5cTDsKTlNnimCqsbh/fmT2LgE+aaU42EMfXo8+bNX91W9I7DDmxfuACXMmrd7d79JxkqWA==} | ||||||
|     dependencies: |     dependencies: | ||||||
|       vue-demi: 0.14.5(vue@3.3.4) |       vue-demi: 0.14.10(vue@3.3.4) | ||||||
|     transitivePeerDependencies: |     transitivePeerDependencies: | ||||||
|       - '@vue/composition-api' |       - '@vue/composition-api' | ||||||
|       - vue |       - vue | ||||||
| @ -5016,7 +5027,6 @@ packages: | |||||||
|   /entities@4.5.0: |   /entities@4.5.0: | ||||||
|     resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} |     resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} | ||||||
|     engines: {node: '>=0.12'} |     engines: {node: '>=0.12'} | ||||||
|     dev: true |  | ||||||
| 
 | 
 | ||||||
|   /errno@0.1.8: |   /errno@0.1.8: | ||||||
|     resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} |     resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} | ||||||
| @ -6688,6 +6698,12 @@ packages: | |||||||
|     dependencies: |     dependencies: | ||||||
|       uc.micro: 1.0.6 |       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: |   /local-pkg@0.4.3: | ||||||
|     resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} |     resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} | ||||||
|     engines: {node: '>=14'} |     engines: {node: '>=14'} | ||||||
| @ -6825,6 +6841,18 @@ packages: | |||||||
|       mdurl: 1.0.1 |       mdurl: 1.0.1 | ||||||
|       uc.micro: 1.0.6 |       uc.micro: 1.0.6 | ||||||
| 
 | 
 | ||||||
|  |   /markdown-it@14.1.0: | ||||||
|  |     resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} | ||||||
|  |     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: |   /marked@10.0.0: | ||||||
|     resolution: {integrity: sha512-YiGcYcWj50YrwBgNzFoYhQ1hT6GmQbFG8SksnYJX1z4BXTHSOrz1GB5/Jm2yQvMg4nN1FHP4M6r03R10KrVUiA==} |     resolution: {integrity: sha512-YiGcYcWj50YrwBgNzFoYhQ1hT6GmQbFG8SksnYJX1z4BXTHSOrz1GB5/Jm2yQvMg4nN1FHP4M6r03R10KrVUiA==} | ||||||
|     engines: {node: '>= 18'} |     engines: {node: '>= 18'} | ||||||
| @ -6873,6 +6901,10 @@ packages: | |||||||
|   /mdurl@1.0.1: |   /mdurl@1.0.1: | ||||||
|     resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} |     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: |   /merge-stream@2.0.0: | ||||||
|     resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} |     resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} | ||||||
|     dev: true |     dev: true | ||||||
| @ -7682,6 +7714,11 @@ packages: | |||||||
|     resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} |     resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|  |   /punycode.js@2.3.1: | ||||||
|  |     resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} | ||||||
|  |     engines: {node: '>=6'} | ||||||
|  |     dev: false | ||||||
|  | 
 | ||||||
|   /punycode@2.3.0: |   /punycode@2.3.0: | ||||||
|     resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} |     resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} | ||||||
|     engines: {node: '>=6'} |     engines: {node: '>=6'} | ||||||
| @ -8626,6 +8663,10 @@ packages: | |||||||
|   /uc.micro@1.0.6: |   /uc.micro@1.0.6: | ||||||
|     resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} |     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: |   /ufo@1.1.2: | ||||||
|     resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} |     resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -7,6 +7,7 @@ import sqlHljs from 'highlight.js/lib/languages/sql'; | |||||||
| import xmlHljs from 'highlight.js/lib/languages/xml'; | import xmlHljs from 'highlight.js/lib/languages/xml'; | ||||||
| import yamlHljs from 'highlight.js/lib/languages/yaml'; | import yamlHljs from 'highlight.js/lib/languages/yaml'; | ||||||
| import iniHljs from 'highlight.js/lib/languages/ini'; | import iniHljs from 'highlight.js/lib/languages/ini'; | ||||||
|  | import markdownHljs from 'highlight.js/lib/languages/markdown'; | ||||||
| import { useCopy } from '@/composable/copy'; | import { useCopy } from '@/composable/copy'; | ||||||
| 
 | 
 | ||||||
| const props = withDefaults( | const props = withDefaults( | ||||||
| @ -30,6 +31,7 @@ hljs.registerLanguage('html', xmlHljs); | |||||||
| hljs.registerLanguage('xml', xmlHljs); | hljs.registerLanguage('xml', xmlHljs); | ||||||
| hljs.registerLanguage('yaml', yamlHljs); | hljs.registerLanguage('yaml', yamlHljs); | ||||||
| hljs.registerLanguage('toml', iniHljs); | hljs.registerLanguage('toml', iniHljs); | ||||||
|  | hljs.registerLanguage('markdown', markdownHljs); | ||||||
| 
 | 
 | ||||||
| const { value, language, followHeightOf, copyPlacement, copyMessage } = toRefs(props); | const { value, language, followHeightOf, copyPlacement, copyMessage } = toRefs(props); | ||||||
| const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) }; | const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) }; | ||||||
|  | |||||||
| @ -9,6 +9,7 @@ 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 xmlToJson } from './xml-to-json'; | import { tool as xmlToJson } from './xml-to-json'; | ||||||
| import { tool as jsonToXml } from './json-to-xml'; | import { tool as jsonToXml } from './json-to-xml'; | ||||||
|  | import { tool as markdownToHtml } from './markdown-to-html'; | ||||||
| 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'; | ||||||
| @ -112,6 +113,7 @@ export const toolsByCategory: ToolCategory[] = [ | |||||||
|       tomlToYaml, |       tomlToYaml, | ||||||
|       xmlToJson, |       xmlToJson, | ||||||
|       jsonToXml, |       jsonToXml, | ||||||
|  |       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: 'Convert Markdown to Html and allow to print (as PDF)', | ||||||
|  |   keywords: ['markdown', 'html', 'converter', 'pdf'], | ||||||
|  |   component: () => import('./markdown-to-html.vue'), | ||||||
|  |   icon: Markdown, | ||||||
|  |   createdAt: new Date('2024-08-25'), | ||||||
|  | }); | ||||||
							
								
								
									
										44
									
								
								src/tools/markdown-to-html/markdown-to-html.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								src/tools/markdown-to-html/markdown-to-html.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,44 @@ | |||||||
|  | <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); | ||||||
|  | }); | ||||||
|  | 
 | ||||||
|  | function printHtml() { | ||||||
|  |   const w = window.open(); | ||||||
|  |   if (w === null) { | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|  |   w.document.body.innerHTML = outputHtml.value; | ||||||
|  |   w.print(); | ||||||
|  | } | ||||||
|  | </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 flex justify-center> | ||||||
|  |       <n-button @click="printHtml"> | ||||||
|  |         Print as PDF | ||||||
|  |       </n-button> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user